last sync: 2020-Oct-23 19:29:54 UTC

Azure Policy

[Preview]: Keys should be the specified cryptographic type RSA or EC

Name [Preview]: Keys should be the specified cryptographic type RSA or EC
Id 75c4f823-d65c-4f29-a733-01d0077fdbcb
Version 1.0.0-preview
details on versioning
Category Key Vault
Description Some applications require the use of keys backed by a specific cryptographic type. Enforce a particular cryptographic key type, RSA or EC, in your environment.
Mode Microsoft.KeyVault.Data
Type BuiltIn
Preview True
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit,Deny,Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2020-10-16 12:27:50 add 75c4f823-d65c-4f29-a733-01d0077fdbcb
Used in Initiatives none
Json
{
  "properties": {
  "displayName": "[Preview]: Keys should be the specified cryptographic type RSA or EC",
    "policyType": "BuiltIn",
    "mode": "Microsoft.KeyVault.Data",
    "description": "Some applications require the use of keys backed by a specific cryptographic type. Enforce a particular cryptographic key type, RSA or EC, in your environment.",
    "metadata": {
      "version": "1.0.0-preview",
      "category": "Key Vault",
      "preview": true
    },
    "parameters": {
      "allowedKeyTypes": {
        "type": "Array",
        "metadata": {
          "displayName": "Allowed key types",
          "description": "The list of allowed key types"
        },
        "allowedValues": [
          "RSA",
          "RSA-HSM",
          "EC",
          "EC-HSM"
        ],
        "defaultValue": [
          "RSA",
          "RSA-HSM",
          "EC",
          "EC-HSM"
        ]
      },
      "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": "[parameters('allowedKeyTypes')]"
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/75c4f823-d65c-4f29-a733-01d0077fdbcb",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "75c4f823-d65c-4f29-a733-01d0077fdbcb"
}