Gallery › App Service › Azure built-in policies
App Service apps should enable end to end encryption
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
Enabling end to end encryption ensures front-end intra-cluster traffic between App Service front-ends and the workers running application workloads is encrypted.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONWebApp_EndToEndEncryption_Audit.json · 62 lines
{
"properties": {
"displayName": "App Service apps should enable end to end encryption",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Enabling end to end encryption ensures front-end intra-cluster traffic between App Service front-ends and the workers running application workloads is encrypted.",
"metadata": {
"version": "1.0.0",
"category": "App Service"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Web/sites"
},
{
"field": "kind",
"notContains": "functionapp"
},
{
"anyOf": [
{
"field": "Microsoft.Web/sites/endToEndEncryptionEnabled",
"exists": "false"
},
{
"field": "Microsoft.Web/sites/endToEndEncryptionEnabled",
"notEquals": "true"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/af1d7e88-c1c8-4ea8-be1f-87bff0df9101",
"name": "af1d7e88-c1c8-4ea8-be1f-87bff0df9101"
}Bylawaf1d7e88-c1c8-4ea8-be1f-87bff0df9101.bylaw.ps1 · 36 lines
# Converted from WebApp_EndToEndEncryption_Audit.json by ConvertTo-Bylaw.
Policy 'af1d7e88-c1c8-4ea8-be1f-87bff0df9101' {
Properties @{
DisplayName = 'App Service apps should enable end to end encryption'
Description = 'Enabling end to end encryption ensures front-end intra-cluster traffic between App Service front-ends and the workers running application workloads is encrypted.'
Version = '1.0.0'
Category = 'App Service'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Web/sites' {
When {
Field kind | Must -Not -ContainText 'functionapp'
}
Require 'endToEndEncryptionEnabled exists' {
Field endToEndEncryptionEnabled | Must -Exist
}
Require 'endToEndEncryptionEnabled is true' {
Field endToEndEncryptionEnabled | Must -Be 'true'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/App Service/WebApp_EndToEndEncryption_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw