Gallery › Mission › Azure built-in policies
App Service Environment apps should not be reachable over public internet.
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. To ensure apps deployed in an App Service Environment are not accessible over public internet, one should deploy App Service Environment with an IP address in virtual network. To set the IP address to a virtual network IP, the App Service Environment must be deployed with an internal load balancer.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "App Service Environment apps should not be reachable over public internet.",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. To ensure apps deployed in an App Service Environment are not accessible over public internet, one should deploy App Service Environment with an IP address in virtual network. To set the IP address to a virtual network IP, the App Service Environment must be deployed with an internal load balancer.",
"metadata": {
"version": "1.0.0",
"category": "Mission"
},
"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/hostingEnvironments"
},
{
"field": "kind",
"like": "ASE*"
},
{
"field": "Microsoft.Web/hostingEnvironments/internalLoadBalancingMode",
"notContains": "2"
},
{
"field": "Microsoft.Web/hostingEnvironments/internalLoadBalancingMode",
"notContains": "3"
},
{
"field": "Microsoft.Web/hostingEnvironments/internalLoadBalancingMode",
"notContains": "Web"
},
{
"field": "Microsoft.Web/hostingEnvironments/internalLoadBalancingMode",
"notContains": "Publishing"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/b5c4b32e-8699-4bfa-8868-9ed118e9982f",
"name": "b5c4b32e-8699-4bfa-8868-9ed118e9982f"
}# Converted from ASERestrictNetAccess_Audit.json by ConvertTo-Bylaw.
Policy 'b5c4b32e-8699-4bfa-8868-9ed118e9982f' {
Properties @{
DisplayName = 'App Service Environment apps should not be reachable over public internet.'
Description = 'This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. To ensure apps deployed in an App Service Environment are not accessible over public internet, one should deploy App Service Environment with an IP address in virtual network. To set the IP address to a virtual network IP, the App Service Environment must be deployed with an internal load balancer.'
Version = '1.0.0'
Category = 'Mission'
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/hostingEnvironments' {
When {
Field kind | Must -BeLike 'ASE*'
Field internalLoadBalancingMode | Must -Not -ContainText '2'
Field internalLoadBalancingMode | Must -Not -ContainText '3'
Field internalLoadBalancingMode | Must -Not -ContainText 'Web'
}
Require 'internalLoadBalancingMode contains Publishing' {
Field internalLoadBalancingMode | Must -ContainText 'Publishing'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Mission/ASERestrictNetAccess_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw