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

Support for AWS CloudHSM #179

Open
dlutsch opened this issue Oct 16, 2023 · 3 comments
Open

Support for AWS CloudHSM #179

dlutsch opened this issue Oct 16, 2023 · 3 comments

Comments

@dlutsch
Copy link

dlutsch commented Oct 16, 2023

As best I can tell there is currently no native support for accessing private keys stored in Amazon's CloudHSM service. It would be great if this feature could be added.

@ebourg
Copy link
Owner

ebourg commented Oct 16, 2023

I agree it would be nice to support it, but this service is very expensive ($1600/month) and I can't spend that much for this project. If someone using AWS CloudHSM could share its access I would get a look.

@ebourg
Copy link
Owner

ebourg commented Oct 17, 2023

I got a look at the AWS documentation, and as I understand the CloudHSM REST API allows one to only manage the HSM instances, and not to perform cryptographic operations. This is performed through a dedicated client SDK that takes the form of a PKCS#11 module or a JCA provider. The client SDK doesn't look to be open source, the JCA provider isn't available on Maven Central and must be installed with a system package. The provider is actually a wrapper over a native library, so figuring out the underlying protocol to access the HSM isn't trivial.

However an HSM can be configured as a keystore for AWS KMS, so Jsign should be able to use a key in a CloudHSM instance already.

@ebourg
Copy link
Owner

ebourg commented Oct 17, 2023

Also worth noting, the name "LiquidSecurity" appears in the documentation and in the native library, that's most likely the name of the Marvell HSM hardware used by AWS. It seems to use an undocumented binary protocol.

If someone manages to reverse engineer this protocol we may be able to integrate it directly into Jsign, but in the meantime it's more reasonable to use the PKCS#11 module provided by AWS. We could add an AWSCLOUDHSM storetype that configures the SunPKCS11 provider similarly to the YUBIKEY and OPENSC storetypes, but I'll need someone to share a CloudHSM account to test it properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants