Gallery › Azure Load Testing › Azure built-in policies
Azure load testing resource should use customer-managed keys to encrypt data at rest
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Use customer-managed keys(CMK) to manage the encryption at rest for your Azure Load Testing resource. By default the encryptio is done using Service managed keys, 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. Learn more at https://docs.microsoft.com/azure/load-testing/how-to-configure-customer-managed-keys?tabs=portal.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "Azure load testing resource should use customer-managed keys to encrypt data at rest",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Use customer-managed keys(CMK) to manage the encryption at rest for your Azure Load Testing resource. By default the encryptio is done using Service managed keys, 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. Learn more at https://docs.microsoft.com/azure/load-testing/how-to-configure-customer-managed-keys?tabs=portal.",
"metadata": {
"version": "1.0.0",
"category": "Azure Load Testing"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy."
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.LoadTestService/loadtests"
},
{
"field": "Microsoft.LoadTestService/loadTests/encryption.keyUrl",
"exists": false
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/65c4f833-1f2e-426c-8780-f6d7593bed7a",
"name": "65c4f833-1f2e-426c-8780-f6d7593bed7a"
}# Converted from LoadTestService_CMK_Audit.json by ConvertTo-Bylaw.
Policy '65c4f833-1f2e-426c-8780-f6d7593bed7a' {
Properties @{
DisplayName = 'Azure load testing resource should use customer-managed keys to encrypt data at rest'
Description = 'Use customer-managed keys(CMK) to manage the encryption at rest for your Azure Load Testing resource. By default the encryptio is done using Service managed keys, 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. Learn more at https://docs.microsoft.com/azure/load-testing/how-to-configure-customer-managed-keys?tabs=portal.'
Version = '1.0.0'
Category = 'Azure Load Testing'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy.'
}
Resource 'Microsoft.LoadTestService/loadtests' {
Require 'encryption.keyUrl exists' {
Field encryption.keyUrl | Must -Exist
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Azure Load Testing/LoadTestService_CMK_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw