Skip to content

Add options for s3 verification #1070

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

Closed
wants to merge 1 commit into from
Closed

Conversation

saolof
Copy link

@saolof saolof commented Mar 5, 2025

Internals wise, this allows the S3 classes to be constructed with the same verify argument as in boto3, which allows to disable SSL verification or to pass a path to a cert bundle separate from the one obtained from environment variables.

User experience wise, having a None | bool | str type for an argument is awful API design, so I only exposed a boolean flag to allow users to explicitly request or disable SSL verification, with a clear statement that it is on by default. I had the factory functions do the conversion between the argument formats. A path to a certs folder is trivial to add if needed, but env variables are still a standard way to pass them.

The main usecase for this is to handle self-hosted S3 endpoints with self-signed certificates until you have proper certs management set up.

@saolof saolof requested a review from a team as a code owner March 5, 2025 00:08
In particular, it makes it possible to disable
verification if your S3 endpoint uses self-signed
certificates (not recommended). Figuring out what
happens if anyone inputs undocumented argument values
was a wild ride through Amazon's object-oriented python code.
@saolof
Copy link
Author

saolof commented Mar 12, 2025

So, being able to show the unreviewed status of this PR led to rapid improvements in our PKI and made the world a safer place. For the end verdict I'm thinking that not having this flag is an excellent safety feature

@saolof saolof closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant