Skip to content
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

Inherit host TLS certificates for networked builds #156

Open
kylewlacy opened this issue Jan 1, 2025 · 0 comments
Open

Inherit host TLS certificates for networked builds #156

kylewlacy opened this issue Jan 1, 2025 · 0 comments

Comments

@kylewlacy
Copy link
Member

If you enable the networking unsafe setting on a process, it will enable network access in the sandbox and copy the host's DNS settings. But, this alone isn't enough for HTTPS requests to work most of the time-- we don't add any TLS certificates to the sandbox, so certificate verification will fail out-of-the-box. The simplest workaround today is to add the ca_certificates package as a dependency to the process, which will include some certs and set the $SSL_CERT_FILE env var, which is enough config to get HTTPS requests to work.

I think a better option would be to tweak the sandbox to automatically inherit certificates from the host when the networking setting is set (or falling back to a default set of WebPKI certs bundled with Brioche-- possibly with an explicit config setting to tweak this behavior). Philosophically, I believe the set of TLS certificates to use is "network-level configuration", just like the host's DNS config is. Especially in enterprise contexts, it's not uncommon for a proxy to intercept and re-encrypt all traffic, which would require using the host's TLS certificates to work properly.

Additionally, if a build is locked with an old version of ca_certificates, then the build will eventually fail once the root certificates expire and get rotated. While we should still give the option to use a specific version of ca_certificates, defaulting to a current set of certs (from the host or from WebPKI certs distributed with Brioche) would be a better choice.

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

No branches or pull requests

1 participant