feat(sandbox): load system CA certificates for upstream TLS connections#862
Open
matz3 wants to merge 1 commit intoNVIDIA:mainfrom
Open
feat(sandbox): load system CA certificates for upstream TLS connections#862matz3 wants to merge 1 commit intoNVIDIA:mainfrom
matz3 wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
The proxy's upstream TLS client only trusted Mozilla root CAs (webpki-roots), which prevented TLS termination from working with internal/corporate hosts using private CA certificates. Load system CA certificates from the container's trust store (e.g. /etc/ssl/certs/ca-certificates.crt) in addition to webpki-roots. This allows custom sandbox images to include corporate CAs via update-ca-certificates. Signed-off-by: Matthias Osswald <mat.osswald@sap.com>
|
All contributors have signed the DCO ✍️ ✅ |
Author
|
I have read the DCO document and I hereby sign the DCO. |
Collaborator
|
recheck |
johntmyers
approved these changes
Apr 16, 2026
Collaborator
|
Hi @matz3 thank you. Is this good to merge? |
Author
|
Yes 👍🏻 |
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
The sandbox proxy's upstream TLS client only trusted Mozilla root CAs (via
webpki-roots), which broke TLS connections to internal or corporate hosts that use private CA certificates. This PR loads system CA certificates from the container's trust store (e.g./etc/ssl/certs/ca-certificates.crt) in addition to Mozilla roots, so custom sandbox images can include corporate CAs viaupdate-ca-certificates.Related Issue
No dedicated GitHub issue created.
The issue is that connections to internal / corporate hosts are not possible in case they use a custom domain with a non-public root CA.
Changes
l7/tls.rs:build_upstream_client_confignow accepts asystem_ca_bundlestring and loads those PEM certs into the rustls root store alongsidewebpki-rootsl7/tls.rs: Newload_pem_certs_into_storehelper that parses a PEM bundle into aRootCertStore, returning(added, ignored)countsl7/tls.rs:read_system_ca_bundlepromoted topub;write_ca_filesnow takes the pre-read bundle as a parameter to avoid reading it twicelib.rs:run_sandboxreads the system CA bundle once and passes it to bothwrite_ca_filesandbuild_upstream_client_configwrite_ca_filesoutputsandbox.mdandgateway-security.mdto reflect the new trust chain behaviorTesting
mise run pre-commitpassesUnit tests added/updated
E2E tests not applicable (according to principal-engineer-reviewer agent)
Manual testing via custom image
Dockerfile:Security validation (via Claude Code / Opus 4.6)
Checklist