fix: align Admin TLS trust behavior with S3 for self-signed CAs#35
Merged
fix: align Admin TLS trust behavior with S3 for self-signed CAs#35
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns the Admin API client’s TLS trust behavior with the S3 client so aliases that rely on system trust stores and/or self-signed CA bundles behave consistently (fixing issue #9).
Changes:
- Switch
reqwestworkspace features to enable both native-root and webpki-root trust stores. - Update
AdminClient::newto explicitly enable built-in roots and to load an optionalAlias.ca_bundlePEM as an additional root. - Add unit tests covering Admin CA bundle error paths (missing file, invalid PEM).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/s3/src/admin.rs | Configure reqwest TLS roots + optional CA bundle in AdminClient::new; add tests for CA bundle failures. |
| Cargo.toml | Adjust workspace reqwest features to include native + webpki rustls root support. |
| Cargo.lock | Lockfile update reflecting new rustls native-certs dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
This PR fixes issue #9 by aligning Admin API TLS trust behavior with S3 behavior.
What changed
reqwestfeatures to include both:rustls-tls-native-rootsrustls-tls-webpki-rootsAdminClient::newto:--insecureca_bundlecerts when configuredWhy
On latest
main, issue #9 was still reproducible:rc lssucceededrc admin user listfailedAfter this change:
rc lssucceededrc admin user listsucceededValidation
cargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspacerustfs/rustfs:1.0.0-alpha.81:Closes #9.