Gallery › Storage › Azure built-in policies
HPC Cache accounts should use customer-managed key for encryption
Converted Policy Audit Deny Disabled Mode Indexed Version 2.0.0
Manage encryption at rest of Azure HPC Cache with customer-managed keys. By default, customer data is encrypted with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "HPC Cache accounts should use customer-managed key for encryption",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Manage encryption at rest of Azure HPC Cache with customer-managed keys. By default, customer data is encrypted with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.",
"metadata": {
"version": "2.0.0",
"category": "Storage"
},
"version": "2.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Disabled",
"Deny"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.StorageCache/caches"
},
{
"anyOf": [
{
"field": "identity.type",
"exists": false
},
{
"field": "Microsoft.StorageCache/caches/encryptionSettings.keyEncryptionKey.keyUrl",
"exists": false
},
{
"field": "Microsoft.StorageCache/caches/encryptionSettings.keyEncryptionKey.sourceVault.Id",
"exists": false
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"2.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/970f84d8-71b6-4091-9979-ace7e3fb6dbb",
"name": "970f84d8-71b6-4091-9979-ace7e3fb6dbb"
}# Converted from StorageCache_CMKEnabled.json by ConvertTo-Bylaw.
Policy '970f84d8-71b6-4091-9979-ace7e3fb6dbb' {
Properties @{
DisplayName = 'HPC Cache accounts should use customer-managed key for encryption'
Description = 'Manage encryption at rest of Azure HPC Cache with customer-managed keys. By default, customer data is encrypted with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key created and owned by you. You have full control and responsibility for the key lifecycle, including rotation and management.'
Version = '2.0.0'
Category = 'Storage'
PolicyVersion = '2.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Disabled', 'Deny')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.StorageCache/caches' {
Require 'identity.type exists' {
Field identity.type | Must -Exist
}
Require 'encryptionSettings.keyEncryptionKey.keyUrl exists' {
Field encryptionSettings.keyEncryptionKey.keyUrl | Must -Exist
}
Require 'encryptionSettings.keyEncryptionKey.sourceVault.id exists' {
Field encryptionSettings.keyEncryptionKey.sourceVault.id | Must -Exist
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Storage/StorageCache_CMKEnabled.json in Azure/azure-policy, under the MIT licence.
Bylaw