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

Hardware Security Module (HSM) Support With HTTPS/TLS/crypto #964

Closed
AiNoKame opened this issue Nov 11, 2017 · 6 comments
Closed

Hardware Security Module (HSM) Support With HTTPS/TLS/crypto #964

AiNoKame opened this issue Nov 11, 2017 · 6 comments

Comments

@AiNoKame
Copy link

I want to offload all cryptographic functionality involving my private keys to my HSM (which contain my non-exportable/non-readable private keys), but as it stands, it seems I have to provide my private keys when setting up an HTTPS server (https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener). Is HSM support on the nodejs roadmap, or is it actually possible to accomplish what I need now? 😉

@rmhrisk
Copy link

rmhrisk commented Nov 11, 2017

@AiNoKame you want to look at OpenSSL engine support, see nodejs/node#6374

@AiNoKame
Copy link
Author

AiNoKame commented Nov 13, 2017

@rmhrisk Thanks for your response! I can see how crypto.setEngine works when you want to use a specified engine to execute cryptographic algorithms on an HSM (for acceleration purposes), but I think I'm requesting something slightly different

I can't see how to feed arguments into an engine to perform operations that utilize an HSM-boarded private key. For example, using https://github.com/OpenSC/libp11#using-p11tool-and-openssl-from-the-command-line, how can you feed in something like pin-key when using crypto?

@rmhrisk
Copy link

rmhrisk commented Nov 13, 2017

I think you need to use https://tools.ietf.org/html/rfc7512 to specify the pin; for OpenSSL on the command line it is my understanding you would specify the key like this "-key pkcs11:object=test-key;type=private;pin-value=XXXX".

I am not positive on how to do this with node, but in the case of NGINX it looks like this:
https://security.stackexchange.com/questions/91394/nginx-and-hsm-integration-to-hold-private-keys

I would ask that once you are done you do a blog post or provide clear step by steps with configuration files for others.

@indutny can you clarify?

@gireeshpunathil
Copy link
Member

@AiNoKame - is this still outstanding?

@gireeshpunathil
Copy link
Member

closing due to inactivity

@josh-hemphill
Copy link

Anyone figure this out?

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

4 participants