Gallery › Security Center › Azure built-in policies
[Deprecated]: Monitor unaudited SQL servers in Azure Security Center
Converted Policy AuditIfNotExists Disabled Mode All Version 1.0.0-deprecated Deprecated
SQL servers which don't have SQL auditing turned on will be monitored by Azure Security Center as recommendations. This policy is deprecated and replaced by the following policy: 'Auditing should be enabled on advanced data security settings on SQL Server'
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_UnauditedSqlServer_Audit_Deprecated.json · 55 lines
{
"properties": {
"displayName": "[Deprecated]: Monitor unaudited SQL servers in Azure Security Center",
"policyType": "BuiltIn",
"mode": "All",
"description": "SQL servers which don't have SQL auditing turned on will be monitored by Azure Security Center as recommendations. This policy is deprecated and replaced by the following policy: 'Auditing should be enabled on advanced data security settings on SQL Server'",
"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"
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/complianceResults",
"name": "auditing",
"existenceCondition": {
"field": "Microsoft.Security/complianceResults/resourceStatus",
"in": [
"OffByPolicy",
"Healthy"
]
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/af8051bf-258b-44e2-a2bf-165330459f9d",
"name": "af8051bf-258b-44e2-a2bf-165330459f9d"
}Bylawaf8051bf-258b-44e2-a2bf-165330459f9d.bylaw.ps1 · 34 lines
# Converted from ASC_UnauditedSqlServer_Audit_Deprecated.json by ConvertTo-Bylaw.
Policy 'af8051bf-258b-44e2-a2bf-165330459f9d' {
Properties @{
DisplayName = '[Deprecated]: Monitor unaudited SQL servers in Azure Security Center'
Description = 'SQL servers which don''t have SQL auditing turned on will be monitored by Azure Security Center as recommendations. This policy is deprecated and replaced by the following policy: ''Auditing should be enabled on advanced data security settings on SQL Server'''
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') -IfPresent
}
}
AuditIfNotExists 'Microsoft.Security/complianceResults' -Name 'auditing' -Effect (Param Effect) {
Require 'resourceStatus is one of 2 values' {
Field resourceStatus | Must -BeIn @('OffByPolicy', 'Healthy')
}
}
}Source: built-in-policies/policyDefinitions/Security Center/ASC_UnauditedSqlServer_Audit_Deprecated.json in Azure/azure-policy, under the MIT licence.
Bylaw