Gallery › App Service › Azure built-in policies
[Deprecated]: App Service apps should enable outbound non-RFC 1918 traffic to Azure Virtual Network
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0-deprecated Deprecated
By default, if one uses regional Azure Virtual Network (VNET) integration, the app only routes RFC1918 traffic into that respective virtual network. Using the API to set 'vnetRouteAllEnabled' to true enables all outbound traffic into the Azure Virtual Network. This setting allows features like network security groups and user defined routes to be used for all outbound traffic from the App Service app.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "[Deprecated]: App Service apps should enable outbound non-RFC 1918 traffic to Azure Virtual Network",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "By default, if one uses regional Azure Virtual Network (VNET) integration, the app only routes RFC1918 traffic into that respective virtual network. Using the API to set 'vnetRouteAllEnabled' to true enables all outbound traffic into the Azure Virtual Network. This setting allows features like network security groups and user defined routes to be used for all outbound traffic from the App Service app.",
"metadata": {
"version": "1.0.0-deprecated",
"category": "App Service",
"deprecated": true
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Web/sites"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Web/sites/config",
"name": "web",
"existenceCondition": {
"field": "Microsoft.Web/sites/config/vnetRouteAllEnabled",
"equals": "true"
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/33228571-70a4-4fa1-8ca1-26d0aba8d6ef",
"name": "33228571-70a4-4fa1-8ca1-26d0aba8d6ef"
}# Converted from VnetRouteAllEnabled_Audit.json by ConvertTo-Bylaw.
Policy '33228571-70a4-4fa1-8ca1-26d0aba8d6ef' {
Properties @{
DisplayName = '[Deprecated]: App Service apps should enable outbound non-RFC 1918 traffic to Azure Virtual Network'
Description = 'By default, if one uses regional Azure Virtual Network (VNET) integration, the app only routes RFC1918 traffic into that respective virtual network. Using the API to set ''vnetRouteAllEnabled'' to true enables all outbound traffic into the Azure Virtual Network. This setting allows features like network security groups and user defined routes to be used for all outbound traffic from the App Service app.'
Version = '1.0.0-deprecated'
Category = 'App Service'
Deprecated = $true
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Web/sites'
AuditIfNotExists 'Microsoft.Web/sites/config' -Name 'web' -Effect (Param Effect) {
Require 'vnetRouteAllEnabled is true' {
Field vnetRouteAllEnabled | Must -Be 'true'
}
}
}Source: built-in-policies/policyDefinitions/App Service/VnetRouteAllEnabled_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw