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

[Request] Support for Azure Managed HSM Vaults #134

Open
tollercode opened this issue Feb 8, 2024 · 6 comments · May be fixed by smallstep/crypto#427
Open

[Request] Support for Azure Managed HSM Vaults #134

tollercode opened this issue Feb 8, 2024 · 6 comments · May be fixed by smallstep/crypto#427
Assignees

Comments

@tollercode
Copy link

Azure also offers Managed HSM that are FIPS 140-2 lvl 3 compliant.
These instances follow the AKV API (no secret & cert support)

It would be nice to have the option to also use managed.
Managed HSM should support the action: getKey & signKey

The only difference is, that they use a different default endpoint: <your-HSM-name>.managedhsm.azure.net

Maybe that could be supported by setting a new optional flag within the uri parameter. E.g. managedhsm=true, or hsm=premium|managed|dedicated

premium = Current behavior using Premium AKV
managed = using Azure Managed HSM
dedicated = future implementation to support dedicated Azure HSM instances

See for a comparison of different AKV SKU

@maraino
Copy link
Contributor

maraino commented Feb 8, 2024

Hi @tollercode, do you know if this service is available in different clouds? I cannot find information about that, see
https://github.com/Azure/azure-sdk-for-go/blob/40a6c1541dd6f0beb3637a2d9b8e7621f4a6ac88/sdk/azcore/cloud/cloud.go#L9-L22

@tollercode
Copy link
Author

Hey @maraino

According to this here
It is only available in the common cloud. No CN or Governmental clouds.

@maraino
Copy link
Contributor

maraino commented Feb 14, 2024

Hi @tollercode, I added some support in this PR smallstep/crypto#427

I'm going with managedhsm=true, as it looks like dedicated HSM uses Thales' own SDK or a PKCS#11 module.

One thing that I'm not currently enforcing is the use of the HSM key types when a new key is created (azkeys.JSONWebKeyTypeECHSM and azkeys.JSONWebKeyTypeRSAHSM). To do this, you will need to add hsm=true. But I would like you to test if the "soft" versions work on a managedhsm or if we must default to the HSM versions.

I don't see anything specific to the premium tier, I believe the SDK will work as it is.

An easy way to pull step-kms-plugin and the branch in crypto and add go.work file to step-kms-plugin so it compiles with the proper crypto:

go 1.20

use .
use ../crypto

@thecmdradama
Copy link

thecmdradama commented Oct 1, 2024

Hey @maraino,

Azure Managed HSM would only support the EC-HSM and RSA-HSM Key types, whereas Premium tier Key Vaults do support both software and HSM backed keys. See https://learn.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#object-types or https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys#hsm-protected-keys

Also keen for this to be added in a future release.

@maraino
Copy link
Contributor

maraino commented Oct 7, 2024

@thecmdradama, Do you have the ability to test the changes in my PR? The main reason it wasn't merged is that I wasn't able to test it.

@thecmdradama
Copy link

Hi @maraino, not easily with just those changes unfortunately.

If I could get a test docker image of step-ca, I can run up a Managed HSM in my own lab environment to validate.

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

Successfully merging a pull request may close this issue.

3 participants