Gallery › Stack HCI › Azure built-in policies
[Deprecated]: Azure Stack HCI servers should have consistently enforced application control policies
Converted Policy Audit Disabled Mode All Version 1.1.0-deprecated Deprecated
This policy is deprecated because it targets security settings resource. Instead of continuing to use this policy, we recommend you instead assign this replacement policy with policy ID /providers/Microsoft.Authorization/policyDefinitions/dad3a6b9-4451-492f-a95c-69efc6f3fada. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONWdacCompliance_Audit.json · 56 lines
{
"properties": {
"displayName": "[Deprecated]: Azure Stack HCI servers should have consistently enforced application control policies",
"policyType": "BuiltIn",
"mode": "All",
"description": "This policy is deprecated because it targets security settings resource. Instead of continuing to use this policy, we recommend you instead assign this replacement policy with policy ID /providers/Microsoft.Authorization/policyDefinitions/dad3a6b9-4451-492f-a95c-69efc6f3fada. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.",
"metadata": {
"version": "1.1.0-deprecated",
"category": "Stack HCI",
"deprecated": true
},
"version": "1.1.0",
"parameters": {
"effect": {
"type": "String",
"defaultValue": "Disabled",
"allowedValues": [
"Audit",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AzureStackHCI/clusters/securitySettings"
},
{
"not": {
"field": "Microsoft.AzureStackHCI/clusters/securitySettings/securityComplianceStatus.wdacCompliance",
"in": [
"Compliant",
"Pending"
]
}
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.1.0",
"1.0.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/7384fde3-11b0-4047-acbd-b3cf3cc8ce07",
"name": "7384fde3-11b0-4047-acbd-b3cf3cc8ce07"
}Bylaw7384fde3-11b0-4047-acbd-b3cf3cc8ce07.bylaw.ps1 · 29 lines
# Converted from WdacCompliance_Audit.json by ConvertTo-Bylaw.
Policy '7384fde3-11b0-4047-acbd-b3cf3cc8ce07' {
Properties @{
DisplayName = '[Deprecated]: Azure Stack HCI servers should have consistently enforced application control policies'
Description = 'This policy is deprecated because it targets security settings resource. Instead of continuing to use this policy, we recommend you instead assign this replacement policy with policy ID /providers/Microsoft.Authorization/policyDefinitions/dad3a6b9-4451-492f-a95c-69efc6f3fada. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.'
Version = '1.1.0-deprecated'
Category = 'Stack HCI'
Deprecated = $true
PolicyVersion = '1.1.0'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Disabled')
Default = 'Disabled'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.AzureStackHCI/clusters/securitySettings' {
Require 'securityComplianceStatus.wdacCompliance is one of 2 values' {
Field securityComplianceStatus.wdacCompliance | Must -BeIn @('Compliant', 'Pending')
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Stack HCI/WdacCompliance_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw