fix: use native OS certificate store for TLS#302
fix: use native OS certificate store for TLS#302jpoehnelt merged 1 commit intogoogleworkspace:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 3368315 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the application's ability to handle TLS connections in diverse network environments, particularly those with corporate or custom certificate authorities. By transitioning to the native OS certificate store for TLS validation, the application can now seamlessly trust certificates installed by users or IT administrators, resolving potential TLS handshake failures that occurred when relying solely on bundled Mozilla root certificates. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to resolve TLS handshake failures in enterprise environments by switching to the native OS certificate store. The change correctly updates reqwest to use rustls-tls-native-roots. However, a critical issue remains: the authentication library, yup-oauth2, is not configured to use the native store and will continue to use bundled certificates, causing authentication to fail in the target environments. The fix is therefore incomplete. I've left a detailed comment on how to address this.
Switch reqwest from `rustls-tls` (bundled Mozilla roots via webpki-roots) to `rustls-tls-native-roots` so the CLI trusts custom/corporate CA certificates installed in the system trust store. This fixes TLS handshake failures in enterprise environments that use internal certificate authorities.
71b5e65 to
3368315
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request correctly switches the reqwest dependency to use the native OS certificate store for TLS by changing the feature flag from rustls-tls to rustls-tls-native-roots. This change, reflected in Cargo.toml and Cargo.lock, is well-motivated for supporting enterprise environments with custom CAs. The implementation is sound and I have no suggestions for improvement.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
=======================================
Coverage 59.09% 59.09%
=======================================
Files 36 36
Lines 12953 12953
=======================================
Hits 7654 7654
Misses 5299 5299 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
reqwestfromrustls-tlsfeature (bundled Mozilla roots viawebpki-roots) torustls-tls-native-roots(OS native certificate store viarustls-native-certs)webpki-rootsdependencyMotivation
In enterprise environments, organizations use internal/corporate certificate authorities. The bundled Mozilla root store does not include these, causing TLS handshake failures. Using the OS native trust store allows the CLI to respect any custom CA certificates installed by the user or their IT/admin team.
Test plan
cargo test)🤖 Generated with Claude Code