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

Add support for client_cert_chain_and_key for all file fetching #26911

Open
haze opened this issue Nov 18, 2024 · 0 comments
Open

Add support for client_cert_chain_and_key for all file fetching #26911

haze opened this issue Nov 18, 2024 · 0 comments
Labels
suggestion suggestions for new features (yet to be agreed) tls Issues related to TLS implementation

Comments

@haze
Copy link

haze commented Nov 18, 2024

What

I'd like to bounce around the idea of accepting command line arguments (for any deno logic that deals with the network) for client_cert_chain_and_key in CreateHttpClientOptions.

Where

  • Implement for usage in CreateHttpClientOptions.
  • Implemented as a top level flag for deno that feeds into the logic for deno run.

How

  • Ideally a --client-cert and --client-key command line argument.
  • Maybe even environment variables if the callee cannot control the program arguments?

Why

I have an odd setup where I have a self-signed client certificate + key with an unknown issuer. I want to use the file import functionality (e.g import { foo } from 'https://my.own.server/foo.ts' with a server that I control that has a odd TLS scheme outside of my control.

I am comfortable using --unsafely-ignore-certificate-errors to get past that, but in my brief attempt I could not get the underlying hyper http machinery to accept my crudely hacked in client cert and key (instantiated at http_util.rs's HttpClientProvider::new. I was however able to configure the TLS connector to accept my certificate and key in a standalone program, and I've (mostly) verified that the TLS configurations are the same there and in demo. (e.g alpn negotiation, underlying crypto module (ring), verifier functionality and supported_verify_schemes.

You can take a look at the demo program here.

@bartlomieju bartlomieju added suggestion suggestions for new features (yet to be agreed) tls Issues related to TLS implementation labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed) tls Issues related to TLS implementation
Projects
None yet
Development

No branches or pull requests

2 participants