Fixes 3360: Add support for newer Elasticsearch search api #426
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since we cannot use certificates, see below, I created tests using basic authentication with the
xpack.security.http.ssl.enabled: false
configurationElasticSearchTest.java
is now the Base Testhttps://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/2136
.apoc.es.delete
to changetestPostCreateDocumentWithAuthHeader
Certificate
To authenticate with elastic 8, there are basically 3 ways:
TESTED IN THIS PR: configuring
xpack.security.http.ssl.enabled: false
, but we have to pass the header (which will be implemented inhttps://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/2136
),configuring
xpack.security.enabled=false
, which is of course a turnoff, since we can authenticate without user and passwordwithout any config, but in this case a certificate is required.
However to handle it, it should be put in the apoc core code something like this in
Util.openUrlConnection
:since we cannot make changes on Core at the moment, I think it is worth creating a trello card to implement it.
I don't think there are any feasible alternatives without touching the apoc core code, unless you copy all the methods into extended of course.