Gallery › App Service › Azure built-in policies
[Deprecated]: API apps should have 'Client Certificates (Incoming client certificates)' enabled
Converted Policy Audit Disabled Mode Indexed Version 1.0.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. We recommend all customers who are still using API Apps to implement the built-in policy called 'App Service apps should have 'Client Certificates (Incoming client certificates)' enabled', which is scoped to include API apps in addition to Web Apps.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "[Deprecated]: API apps 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. We recommend all customers who are still using API Apps to implement the built-in policy called 'App Service apps should have 'Client Certificates (Incoming client certificates)' enabled', which is scoped to include API apps in addition to Web Apps.",
"metadata": {
"version": "1.0.0-deprecated",
"category": "App Service",
"deprecated": true
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Web/sites"
},
{
"field": "kind",
"like": "*api"
},
{
"field": "Microsoft.Web/sites/clientCertEnabled",
"equals": "false"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/0c192fe8-9cbb-4516-85b3-0ade8bd03886",
"name": "0c192fe8-9cbb-4516-85b3-0ade8bd03886"
}# Converted from ApiApp_Audit_ClientCert.json by ConvertTo-Bylaw.
Policy '0c192fe8-9cbb-4516-85b3-0ade8bd03886' {
Properties @{
DisplayName = '[Deprecated]: API apps 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. We recommend all customers who are still using API Apps to implement the built-in policy called ''App Service apps should have ''Client Certificates (Incoming client certificates)'' enabled'', which is scoped to include API apps in addition to Web Apps.'
Version = '1.0.0-deprecated'
Category = 'App Service'
Deprecated = $true
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('Audit', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Web/sites' {
When {
Field kind | Must -BeLike '*api'
}
Require 'clientCertEnabled is not false' {
Field clientCertEnabled | Must -Not -Be 'false' -IfPresent
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/App Service/ApiApp_Audit_ClientCert.json in Azure/azure-policy, under the MIT licence.
Bylaw