Gallery › Sovereignty › Azure built-in policies
[Preview]: Enforce Encryption-at-Rest with Customer Managed Keys (CMK) with Azure Key Vault Managed HSM Keys across Azure Services
Doesn't convert yet Initiative Version 1.0.0-preview Preview
Help restrict and audit Azure Services to use CMK with Azure Key Vault Premium Managed HSM keys
ConvertTo-Bylaw can't convert this initiative yet:
- BYL6003 The converted file doesn't compile, which is a ConvertTo-Bylaw bug: BYL3002: DisplayName is 130 characters; Azure allows at most 128.
Azure Policy JSONEnforceCMKWithHSM.json · 64 lines
{
"properties": {
"displayName": "[Preview]: Enforce Encryption-at-Rest with Customer Managed Keys (CMK) with Azure Key Vault Managed HSM Keys across Azure Services",
"policyType": "BuiltIn",
"description": "Help restrict and audit Azure Services to use CMK with Azure Key Vault Premium Managed HSM keys",
"metadata": {
"version": "1.0.0-preview",
"category": "Sovereignty",
"preview": true,
"SovereigntyLevel": "Level 2 - Encryption at-rest/in-transit"
},
"version": "1.0.0-preview",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "This parameter lets you choose the effect of the policy. If you choose Audit, the policy will only audit resources for compliance. If you choose Deny (default), the policy will deny the creation of non-compliant resources. If you choose Disabled, the policy will not enforce compliance (useful, for example, as a second assignment to ignore a subset of non-compliant resources in a single resource group)."
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny"
},
"75c4f823-d65c-4f29-a733-01d0077fdbcb_allowedKeyTypes": {
"type": "Array",
"metadata": {
"displayName": "Allowed key types in Key Vault",
"description": "The list of allowed key types in Key Vault"
},
"allowedValues": [
"RSA-HSM",
"EC-HSM"
],
"defaultValue": [
"RSA-HSM",
"EC-HSM"
]
}
},
"policyDefinitions": [
{
"policyDefinitionReferenceId": "cryptographicKeyTypesInKeyVault",
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/75c4f823-d65c-4f29-a733-01d0077fdbcb",
"definitionVersion": "1.*.*",
"parameters": {
"effect": {
"value": "[parameters('effect')]"
},
"allowedKeyTypes": {
"value": "[parameters('75c4f823-d65c-4f29-a733-01d0077fdbcb_allowedKeyTypes')]"
}
}
}
],
"versions": [
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/7a00a7fc-fdf4-4ad8-8fa2-a94acc223e8e",
"name": "7a00a7fc-fdf4-4ad8-8fa2-a94acc223e8e"
}Members (1)
Source: built-in-policies/policySetDefinitions/Sovereignty/EnforceCMKWithHSM.json in Azure/azure-policy, under the MIT licence.
Bylaw