-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(runtime/tls): Add support for client certificates to connectTls #9426
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. The changes LGTM in themselves but another maintainer should make the call on the API.
I personally think the file-based API is kind of clunky but it's precedent. It also has going for it that key data doesn't go through JS land.
We have already started moving away from the file based APIs for new unstable APIs like |
Agree with Luca. Additionally |
Why? We don't support it for |
Yes, for 2.0, but for now it should still be supported. |
Disregard this comment, I misunderstood what this PR does. Implementation looks good to me, but let's put it in the |
Thanks for the quick review all! @bartlomieju updated, let me know if the refactor looks right |
1e04560
to
b36083c
Compare
23ca51b
to
ee3c790
Compare
I decided not to use Deno for the project this was relevant to, so I'll be closing out the PR If someone else decides to pick this up later, the implementation works fine as is, but integration tests aren't working on GitHub CI for reasons I couldn't figure out. They pass reliably locally. Probably something simple |
@erik No worries.This PR is 99% there, just need to get the tests working in CI. I will pick this up for the 1.9 release. Thanks for the effort! |
I'm currently using |
Related To #10516 |
@lucacasonato any update on this change? Just spent a couple of hours writing a node mTLS proxy server to sit behind deno, but would prefer to do everything with deno. Can I help with getting this PR into the next release? |
@seanwykes I've rebased this patch and opened a new PR in #11598 - we'll try to get it in for 1.13.0 (which comes out next week) |
Allows specifying a client certificate for mutual TLS in calls to
Deno.connectTls()
.Some implementation notes:
ConnectTlsOptions
parametercertFile
is confusing when combined with client certificate paramcertChain
. Should we pull them into a separate object? Prefix the names withclient
? Open to suggestions.certFile
param.I couldn't think of a great way to unit test that the certificates are actually set properly on the underlying connection, sinceDeno.Conn
has no way of exposing the peer's client certificate from the other end of the connection.Partially implements #6170