last sync: 2021-Sep-22 19:36:51 UTC

Azure Policy definition

Keys should be backed by a hardware security module (HSM)

Name Keys should be backed by a hardware security module (HSM)
Azure Portal
Id 587c79fe-dd04-4a5e-9d0b-f89598c7261b
Version 1.0.1
details on versioning
Category Key Vault
Microsoft docs
Description An HSM is a hardware security module that stores keys. An HSM provides a physical layer of protection for cryptographic keys. The cryptographic key cannot leave a physical HSM which provides a greater level of security than a software key.
Mode Microsoft.KeyVault.Data
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Deny, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-08-30 14:27:30 change Patch, old suffix: preview (1.0.0-preview > 1.0.1)
2020-10-16 12:27:50 add 587c79fe-dd04-4a5e-9d0b-f89598c7261b
Used in Initiatives none
JSON Changes

JSON
{
  "displayName": "Keys should be backed by a hardware security module (HSM)",
  "policyType": "BuiltIn",
  "mode": "Microsoft.KeyVault.Data",
  "description": "An HSM is a hardware security module that stores keys. An HSM provides a physical layer of protection for cryptographic keys. The cryptographic key cannot leave a physical HSM which provides a greater level of security than a software key.",
  "metadata": {
    "version": "1.0.1",
    "category": "Key Vault"
  },
  "parameters": {
    "effect": {
      "type": "String",
      "metadata": {
        "displayName": "Effect",
        "description": "'Audit' allows a non-compliant resource to be created, but flags it as non-compliant. 'Deny' blocks the resource creation. 'Disable' turns off the policy."
      },
      "allowedValues": [
        "Audit",
        "Deny",
        "Disabled"
      ],
      "defaultValue": "Audit"
    }
  },
  "policyRule": {
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.KeyVault.Data/vaults/keys"
        },
        {
          "field": "Microsoft.KeyVault.Data/vaults/keys/keyType",
          "notIn": [
            "RSA-HSM",
            "EC-HSM"
          ]
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]"
    }
  }
}