Repository navigation
Elastic api - #556
Merged
Merged
Elastic api#556
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two defects in the same 15-line function,
Api.new_client_basic_auth().The client was built with an SSLContext that switched both certificate checks off and handed
verify_certsalongside it.elastic_transportconfigures the urllib3 pool fromverify_certsregardless of the context, so the context never took effect,ca_certsnever reached the connection, and anhttphost was rejected with aValueErrorbefore the first request.The modules also refused nothing on version 7 of the
elasticsearchlibrary. That version acceptsbasic_authwithout sending the credentials, so every request arrived unauthenticated and came back as HTTP 401. That is the error in #335. The library ends up at version 7 becausepackages.ymlfell back to the distribution package on every host: its conditionnot elasticstack_pip_installation | boolcan never be true, a registered result is a dict and the bool filter coerces any dict to false. On EL 9 and Ubuntu 22.04, two of the three platforms this collection declares, that package is still version 7.Measured on three real client installations and against a local TLS server:
basic_authsets the authorization headerValueError: TLS options require scheme to be 'https'Closes #549
Closes #335