Add ssl context for host verification in httpx client#104
Open
germanfgv wants to merge 1 commit intoeth-cscs:masterfrom
Open
Add ssl context for host verification in httpx client#104germanfgv wants to merge 1 commit intoeth-cscs:masterfrom
germanfgv wants to merge 1 commit intoeth-cscs:masterfrom
Conversation
theely
requested changes
Jul 14, 2025
Collaborator
theely
left a comment
There was a problem hiding this comment.
Thanks for contribution!
I have left and inline comment related to imports and providing a simpler solution.
| client = AsyncOAuth2Client( | ||
| self.cluster.service_account.client_id, | ||
| self.cluster.service_account.secret.get_secret_value(), | ||
| verify=ctx, |
Collaborator
There was a problem hiding this comment.
Can we reduce the number of new imports by simplifying the change?
Would something like this work?
ca_bundle = os.environ.get("REQUESTS_CA_BUNDLE", None)
...
verify= ca_bundle if ca_bundle else True
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.
Fix #95
Creates an SSL context using the CA certificate bundle specified in
REQUESTS_CA_BUNDLEor the one providedcertifipackage. Then use this context for SSL verification in thehttpxclient used during cluster health checks.The purpose of this is for the
httpxclient to mimic the configuration of therequestsclient.