Gallery › App Service › Azure built-in policies
[Deprecated]: App Service app slots should have 'Client Certificates (Incoming client certificates)' enabled
Converted Policy Audit Disabled Mode Indexed Version 1.1.0-deprecated Deprecated
Client certificates allow for the app to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the app. This policy has been replaced by a new policy with the same name because Http 2.0 doesn't support client certificates.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONWebapp_Slot_Audit_ClientCert.json · 63 lines
{
"properties": {
"displayName": "[Deprecated]: App Service app slots should have 'Client Certificates (Incoming client certificates)' enabled",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Client certificates allow for the app to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the app. This policy has been replaced by a new policy with the same name because Http 2.0 doesn't support client certificates.",
"metadata": {
"version": "1.1.0-deprecated",
"category": "App Service",
"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.Web/sites/slots"
},
{
"field": "kind",
"notContains": "functionapp"
},
{
"anyOf": [
{
"field": "Microsoft.Web/sites/slots/clientCertEnabled",
"exists": "false"
},
{
"field": "Microsoft.Web/sites/slots/clientCertEnabled",
"equals": "false"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.1.0",
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/2f7c08c2-f671-4282-9fdb-597b6ef2c10d",
"name": "2f7c08c2-f671-4282-9fdb-597b6ef2c10d"
}Bylaw2f7c08c2-f671-4282-9fdb-597b6ef2c10d.bylaw.ps1 · 38 lines
# Converted from Webapp_Slot_Audit_ClientCert.json by ConvertTo-Bylaw.
Policy '2f7c08c2-f671-4282-9fdb-597b6ef2c10d' {
Properties @{
DisplayName = '[Deprecated]: App Service app slots should have ''Client Certificates (Incoming client certificates)'' enabled'
Description = 'Client certificates allow for the app to request a certificate for incoming requests. Only clients that have a valid certificate will be able to reach the app. This policy has been replaced by a new policy with the same name because Http 2.0 doesn''t support client certificates.'
Version = '1.1.0-deprecated'
Category = 'App Service'
Deprecated = $true
PolicyVersion = '1.1.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('Audit', 'Disabled')
Default = 'Disabled'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Web/sites/slots' {
When {
Field kind | Must -Not -ContainText 'functionapp'
}
Require 'clientCertEnabled exists' {
Field clientCertEnabled | Must -Exist
}
Require 'clientCertEnabled is not false' {
Field clientCertEnabled | Must -Not -Be 'false' -IfPresent
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/App Service/Webapp_Slot_Audit_ClientCert.json in Azure/azure-policy, under the MIT licence.
Bylaw