Add support for DENO_TLS_CA_STORE env variable#184
Merged
andreespirela merged 1 commit intosupabase:mainfrom Oct 3, 2023
Merged
Add support for DENO_TLS_CA_STORE env variable#184andreespirela merged 1 commit intosupabase:mainfrom
andreespirela merged 1 commit intosupabase:mainfrom
Conversation
Contributor
|
@mdluo Thanks for the contribution. We'll review this in the next 2 days (sorry about the delay) |
Contributor
andreespirela
left a comment
There was a problem hiding this comment.
Can this have a test of some sort?
|
🎉 This PR is included in version 1.21.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What kind of change does this PR introduce?
Deno 1.13 introduced
DENO_TLS_CA_STOREenvironment variable that can be used to switch which certificate authorities Deno trusts for TLS: https://deno.com/blog/v1.13#use-system-certificate-store-for-tlsThis PR bring this env variable support to edge-runtime by adapting the source code from deno: https://github.com/denoland/deno/blob/v1.37.0/cli/args/mod.rs#L467
DENO_TLS_CA_STOREallows 2 values:mozillaorsystem, and default tomozilla, which is the current default behavior as well. Users need to explicitly set it tosystemto trust the extra root cert stores.What is the current behavior?
It is not possible to make network request to services with self-signed certificate, even after adding the root-ca to the system with
ca-certificates:And you will get an error that looks like:
What is the new behavior?
By setting
DENO_TLS_CA_STOREtosystemand rebuild the docker image, the HTTPS requests in the worker function works as intended.Additional context