-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix/external client CA bundle #13451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
simonrw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok with this change given the current api but this envar is not one of ours - it's from requests itself. It's a shame we are hard coding these variables rather than reading from the standard environment. Ho hum...
Let's just address my suggestion otherwise
| if ca_cert := os.getenv("REQUESTS_CA_BUNDLE"): | ||
| LOG.debug("Creating External AWS Client with REQUESTS_CA_BUNDLE=%s", ca_cert) | ||
|
|
||
| super().__init__(use_ssl=True, verify=ca_cert or True, session=session, config=config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use USE_SSL here for the ssl flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame we are hard coding these variables rather than reading from the standard environment. Ho hum...
I agree this isn't the cleanest, but this is what is currently used and documented in LocalStack. I thought of using AWS_CA_BUNDLE instead, but it seemed quite repetitive with what is already implemented for ca bundles.
Should we use USE_SSL here for the ssl flag?
Good point. Is there any security concern for the user to do so? I guess they are in control of setting the env, so probably not.
Motivation
This PR enforces custom CA Certificates to the
ExternalBypassDnsClientFactory. This change will enable our users using proxy with ssl termination to register their own CA bundles.Changes
The CA bundle provided with
REQUESTS_CA_BUNDLEwill now be used to configure the connections of theExternalBypassDnsClientFactoryTests
Related
fixes UNC-137
upstream test full-run: 19842076873