Info icon
End of Life Notice: For Trend Cloud One™ - Conformity Customers, Conformity will reach its End of Sale on “July 31st, 2025” and End of Life “July 31st, 2026”. The same capabilities and much more is available in TrendAI Vision One™ Cloud Risk Management. For details, please refer to Upgrade to TrendAI Vision One™

Use Azure Key Vault Managed HSM When Required

TrendAI Vision One™ provides continuous assurance that gives peace of mind for your cloud infrastructure, delivering over 1400 automated best practice checks.

Risk Level: Medium (should be achieved)

Ensure that workloads with a regulatory or compliance requirement mandating the use of a dedicated hardware security module (HSM) use Azure Key Vault Managed HSM instead of the standard, multi-tenant Azure Key Vault. Azure Key Vault Managed HSM is a fully managed, highly available, single-tenant cloud service that safeguards cryptographic keys using FIPS 140-3 Level 3 validated HSMs (previously validated to FIPS 140-2 Level 3), giving your organization exclusive, customer-controlled ownership of the security domain, which acts as the root of trust for every HSM-protected key. Unlike Azure Key Vault Standard, which is FIPS 140-2 Level 1 validated and software-protected, or Azure Key Vault Premium, which is FIPS 140-3 Level 3 validated on current HSM Platform 2 (keys created on the older HSM Platform 1 remain FIPS 140-2 Level 2) but relies on Microsoft-owned, multi-tenant HSMs, Managed HSM stores only cryptographic keys (no secrets or certificates) in an isolated HSM pool that only your organization's designated administrators can access. This recommendation carries a manual assessment status because it applies only when an organization has a specific regulatory or contractual requirement for a dedicated HSM; a rule can verify whether a Managed HSM instance exists, but cannot by itself determine whether your organization is subject to such a requirement.

Security

Managed HSM provides centralized key management, an isolated Managed HSM local role-based access control (RBAC) model, and support for private endpoints, and it integrates with services such as Azure SQL, Azure Storage, Azure Information Protection, and Customer Key for Microsoft 365. Because Microsoft cannot access, extract, or use the cryptographic keys stored in a Managed HSM instance, and because the security domain and root of trust remain entirely under your organization's control, using Managed HSM demonstrates the key sovereignty and single tenancy that many regulatory frameworks in banking, government, and other highly regulated industries require. Continuing to store HSM-backed keys in the standard, Microsoft-owned, multi-tenant Key Vault Premium tier when such a requirement applies leaves an organization unable to demonstrate that its cryptographic root of trust is isolated from other tenants, which can result in failed compliance audits and regulatory exposure.

Note: This is a manual CIS control. Use this rule's audit result, whether a Managed HSM instance exists, as one input to a compliance determination that only your organization can make. Do not treat the absence of a Managed HSM instance as non-compliant unless a documented regulatory or contractual requirement mandates dedicated HSM usage for the audited scope.

Managed HSM incurs a cost per month for each actively used HSM-protected key, which varies by key type and quantity, and each key version is billed separately. An hourly usage fee also applies per Managed HSM pool. Review the Key Vault pricing page to estimate costs before provisioning a Managed HSM instance.


Audit

To determine if an Azure Key Vault Managed HSM instance is provisioned within your Microsoft Azure account, perform the following operations:

Using Azure Console

  1. Sign in to the Microsoft Azure Portal.

  2. Navigate to Azure Key Vault Managed HSMs blade available at https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.KeyVault%2FmanagedHSMs to list the Managed HSM instances available across your Microsoft Azure subscriptions.

  3. Choose the Azure subscription that you want to examine from the Subscription equals all filter box and choose Apply.

  4. If no Managed HSM instances are listed for the selected subscription, no dedicated hardware security module is currently provisioned within that subscription.

  5. If one or more Managed HSM instances are listed, click on the name (link) of the instance that you want to examine and check the Status value on the Overview page. If Status is not Active, the Managed HSM instance has not been activated and is not yet available for use.

  6. Repeat step no. 5 for each Managed HSM instance listed for the selected subscription.

  7. Repeat steps no. 3 – 6 for each subscription available within your Microsoft Azure account.

  8. Optionally, to check whether individual cryptographic keys are backed by a hardware security module, navigate to Policy available at https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Compliance and review the compliance state of the built-in policy definition Keys should be backed by a hardware security module (HSM) (Policy ID 587c79fe-dd04-4a5e-9d0b-f89598c7261b).

    If your organization has a documented regulatory or compliance requirement mandating the use of a dedicated hardware security module, and no active Managed HSM instance is available in the audited scope, the selected scope is not compliant with this recommendation.

Using Azure CLI

  1. Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:

    az account list
    --query '[*].id'
    
  2. The command output should return the requested subscription identifiers (IDs):

    [
        "abcdabcd-1234-abcd-1234-abcdabcdabcd",
        "abcd1234-abcd-1234-abcd-abcd1234abcd"
    ]
    
  3. Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to examine as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):

    az account set
    --subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
    
  4. Run keyvault list command (Windows/macOS/Linux) with custom query filters to list the name and type of each Key Vault vault and Managed HSM instance available in the selected Azure subscription. By default, this command lists both resource types; pass --resource-type hsm to list only Managed HSM instances:

    az keyvault list
    --query '[*].{name:name, type:type}'
    
  5. The command output should return the requested resource names and types:

    [
        {
            "name": "cc-project5-key-vault",
            "type": "Microsoft.KeyVault/vaults"
        },
        {
            "name": "cc-compliance-hsm",
            "type": "Microsoft.KeyVault/managedHSMs"
        }
    ]
    

    Check whether any entry has a "type" value of "Microsoft.KeyVault/managedHSMs". If no entry returns this type, and your organization has a regulatory or compliance requirement mandating the use of a dedicated hardware security module, no Managed HSM instance is currently provisioned in the selected Azure subscription.

  6. For each Managed HSM instance identified at the previous step, run keyvault show command (Windows/macOS/Linux) with the name of the Managed HSM instance as the identifier parameter to determine its activation status:

    az keyvault show
    --hsm-name cc-compliance-hsm
    --query 'properties.provisioningState'
    
  7. The command output should return the requested provisioning state:

    "Activated"
    

    If the command output does not return "Activated", the selected Managed HSM instance has not completed activation (that is, the security domain has not been downloaded) and cannot yet process key operations.

  8. Repeat steps no. 4 – 7 for each subscription available within your Microsoft Azure account.

Remediation / Resolution

To provision an Azure Key Vault Managed HSM instance for workloads that require a dedicated hardware security module, perform the following operations:

Provisioning a Managed HSM instance does not automatically migrate existing keys. After activation, you must import or create the HSM-protected keys that require dedicated HSM protection within the new Managed HSM instance, then update the applications and services that reference the original keys to use the new key URIs. Managed HSM instances remain billable throughout any soft-delete retention period, even after the resource group that contains them is deleted.

Using Azure Console

  1. Sign in to the Microsoft Azure Portal.

  2. Navigate to Azure Key Vault Managed HSMs blade available at https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.KeyVault%2FmanagedHSMs to list the Managed HSM instances available across your Microsoft Azure subscriptions.

  3. Choose Create.

  4. On the Basics tab, provide the following information:

    1. For Subscription, select the Azure subscription that you want to use.
    2. For Resource group, select an existing resource group or choose Create new and provide a name.
    3. For Managed HSM name, provide a unique name for the new Managed HSM instance.
    4. For Region, select the Azure region where the Managed HSM instance should reside.
    5. For Initial administrator(s), search for and select the Microsoft Entra users or groups that you want to designate as the initial Managed HSM administrators.
  5. Adjust the settings on the Advanced, Networking, and Tags tabs as needed, then choose Review + create, followed by Create.

  6. Once the deployment completes, click on the name (link) of the new Managed HSM instance to navigate to its Overview page.

  7. In the Overview page, select Activate managed HSM, then follow the portal prompts to upload a minimum of three (maximum ten) RSA public key certificates and specify the quorum (the minimum number of private keys required to decrypt the security domain).

  8. Choose Download to download the encrypted security domain file. Once the download completes successfully, the Status value for the Managed HSM instance changes to Active and the instance is ready to use.

  9. Store the downloaded security domain file and the corresponding RSA private keys in a secure location; they are required for disaster recovery and to create additional Managed HSM instances that share the same security domain.

  10. Repeat steps no. 3 – 9 for each Managed HSM instance that you need to provision.

  11. Repeat steps no. 2 – 10 for each subscription available within your Microsoft Azure account.

Using Azure CLI

  1. Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:

    az account list
    --query '[*].id'
    
  2. The command output should return the requested subscription identifiers (IDs):

    [
        "abcdabcd-1234-abcd-1234-abcdabcdabcd",
        "abcd1234-abcd-1234-abcd-abcd1234abcd"
    ]
    
  3. Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to configure as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):

    az account set
    --subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
    
  4. Run ad signed-in-user show command (Bash on macOS/Linux, or Azure Cloud Shell on Windows) with custom output filters to get the object ID (OID) of the signed-in user and store it in a variable, to designate as the initial Managed HSM administrator. In PowerShell, use $oid = az ad signed-in-user show --query id -o tsv instead:

    oid=$(az ad signed-in-user show --query id -o tsv)
    

    Alternatively, prepare a space-separated list of object IDs for the Microsoft Entra users or groups that you want to designate as administrators.

  5. Run keyvault create command (Windows/macOS/Linux) with the name of the new Managed HSM instance, the associated resource group, a retention period for soft-delete, and the administrator object ID(s) as parameters, to provision a new Managed HSM instance:

    az keyvault create
    --hsm-name cc-compliance-hsm
    --resource-group cloud-shell-storage-westeurope
    --location westeurope
    --administrators $oid
    --retention-days 90
    
  6. The command output should return the configuration information available for the newly provisioned Managed HSM instance, including a "provisioningState" value of "Succeeded" and a "type" value of "Microsoft.KeyVault/managedHSMs". The Managed HSM instance cannot process key operations until it is activated in the following steps.

  7. Run openssl req command (OSX/Linux/UNIX) three times to generate three self-signed RSA certificates, used as wrapping keys to activate the Managed HSM instance. The -nodes flag leaves the resulting private keys unencrypted on disk for this demonstration; for production environments, generate and store these RSA key pairs on an air-gapped system or protected key store instead, since they are required to recover the security domain:

    openssl req -newkey rsa:2048 -nodes -keyout cert_0.key -x509 -days 365 -out cert_0.cer
    openssl req -newkey rsa:2048 -nodes -keyout cert_1.key -x509 -days 365 -out cert_1.cer
    openssl req -newkey rsa:2048 -nodes -keyout cert_2.key -x509 -days 365 -out cert_2.cer
    
  8. Run keyvault security-domain download command (Windows/macOS/Linux) with the name of the Managed HSM instance, the paths to the RSA public key certificates generated in the previous step, and the required quorum, to download the security domain and activate the Managed HSM instance:

    Note: Before running the command, ensure your workstation has direct network connectivity (port 443) to the Managed HSM data plane endpoint (<hsm-name>.managedhsm.azure.net). If public network access is disabled or restricted to specific networks/private endpoints, run this command from a host or virtual machine within the allowed virtual network; the download fails with a network/fetch error otherwise.

    az keyvault security-domain download
    --hsm-name cc-compliance-hsm
    --sd-wrapping-keys cert_0.cer cert_1.cer cert_2.cer
    --sd-quorum 2
    --security-domain-file cc-compliance-hsm-SD.json
    
  9. The command downloads the encrypted security domain to the file specified by --security-domain-file and produces no console output. Once the download completes successfully, the Managed HSM instance is in an active state and ready for use. Store the security domain file and the RSA private keys securely; they are required for disaster recovery or for creating another Managed HSM instance that shares the same security domain.

  10. Repeat steps no. 5 – 9 for each Managed HSM instance that you need to provision.

  11. Repeat steps no. 3 – 10 for each subscription available within your Microsoft Azure account.

References

Publication date Sep 15, 2026