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

HTTPS connector support #490

Open
tony-iqlusion opened this issue Oct 25, 2023 · 2 comments
Open

HTTPS connector support #490

tony-iqlusion opened this issue Oct 25, 2023 · 2 comments

Comments

@tony-iqlusion
Copy link
Member

Presently the HTTP connector uses a bespoke minimalist HTTP client embedded in this crate which does not support SSL/TLS:

// TODO(tarcieri): replace this with e.g. `ureq`?

It could potentially be replaced by a crate like ureq which supports HTTPS via e.g. rustls

@Ange-Cesari
Copy link

Ange-Cesari commented Oct 30, 2023

Hello @tony-iqlusion ,

I might be off-topic so I'd like a little bit more explanations about what you try to achieve with the https connector ?

For instance, I'm working to have an mTLS server that allows People with a signed certificate inside the yubikey to authenticate.
But in order to do that, I need to be able to read the certificate and "unlock" the private key with the PIV PIN.

I couldn't see any documentation nor issue related to this, on any library until now.

And I'm asking you this because the "mTLS" authentication i'm talking about is actually an https client.

Right now it's done with a mere curl that I provided openssl engine with. It's working but it's very heavy to reproduce on other machines because it depends a lot on dynamic configuration and versions.

Especially on Macos, which you are provided with libressl and not openssl by default. And you can't have engine with libressl.

And once it's done you must configure the curl to use the openssl you provided, to have all the engine...

By any chance, do you have any insights about this, a working library that can achieve that, or maybe, the curent topic you did an issue for that i'm currently answering to ?

Regards,
Ange

PS:

I might really be off-topic because i'm not exactly using an yubihsm but a Yubikey 5c which also supports PIV and that are usb c.

@tony-iqlusion
Copy link
Member Author

There aren't any specific plans for this feature. FWIW our usages at @iqlusioninc are entirely via the USB driver.

I would expect that initial support would largely resemble the YubiHSM SDK, with the client capable of initiating an HTTPS connection to a process like yubihsm-connector. The client would verify the server's certificate, but full mTLS would probably come later, with the client authenticating to the YubiHSM by opening an encrypted session which is tunneled within TLS (YubiHSMs use a separate transport encryption protocol called SCP03 with its own symmetric key-based authentication).

Note I'm not planning on working on this, but if someone would like to add rustls support to the existing client or swap it entirely for ureq, that would be appreciated.

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

2 participants