Gallery › Security Center › Azure built-in policies
[Deprecated]: Monitor unencrypted SQL databases in Azure Security Center
Converted Policy AuditIfNotExists Disabled Mode All Version 1.0.0-deprecated Deprecated
Unencrypted SQL databases will be monitored by Azure Security Center as recommendations. This policy is deprecated and replaced by the following policy: Transparent Data Encryption on SQL databases should be enabled'
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_UnencryptedSqlDB_Audit_Deprecated.json · 55 lines
{
"properties": {
"displayName": "[Deprecated]: Monitor unencrypted SQL databases in Azure Security Center",
"policyType": "BuiltIn",
"mode": "All",
"description": "Unencrypted SQL databases will be monitored by Azure Security Center as recommendations. This policy is deprecated and replaced by the following policy: Transparent Data Encryption on SQL databases should be enabled'",
"metadata": {
"version": "1.0.0-deprecated",
"category": "Security Center",
"deprecated": true
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"in": [
"Microsoft.SQL/servers/databases"
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/complianceResults",
"name": "encryption",
"existenceCondition": {
"field": "Microsoft.Security/complianceResults/resourceStatus",
"in": [
"OffByPolicy",
"Healthy"
]
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/a8bef009-a5c9-4d0f-90d7-6018734e8a16",
"name": "a8bef009-a5c9-4d0f-90d7-6018734e8a16"
}Bylawa8bef009-a5c9-4d0f-90d7-6018734e8a16.bylaw.ps1 · 34 lines
# Converted from ASC_UnencryptedSqlDB_Audit_Deprecated.json by ConvertTo-Bylaw.
Policy 'a8bef009-a5c9-4d0f-90d7-6018734e8a16' {
Properties @{
DisplayName = '[Deprecated]: Monitor unencrypted SQL databases in Azure Security Center'
Description = 'Unencrypted SQL databases will be monitored by Azure Security Center as recommendations. This policy is deprecated and replaced by the following policy: Transparent Data Encryption on SQL databases should be enabled'''
Version = '1.0.0-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource * {
Require 'type is not one of 1 value' {
Field type | Must -Not -BeIn @('Microsoft.SQL/servers/databases') -IfPresent
}
}
AuditIfNotExists 'Microsoft.Security/complianceResults' -Name 'encryption' -Effect (Param Effect) {
Require 'resourceStatus is one of 2 values' {
Field resourceStatus | Must -BeIn @('OffByPolicy', 'Healthy')
}
}
}Source: built-in-policies/policyDefinitions/Security Center/ASC_UnencryptedSqlDB_Audit_Deprecated.json in Azure/azure-policy, under the MIT licence.
Bylaw