Gallery › Logic Apps › Azure Landing Zones Library
Logic apps should disable public network access
Converted Policy Audit Deny Disabled Mode All Version 1.0.0
Disabling public network access improves security by ensuring that the Logic App is not exposed on the public internet. Creating private endpoints can limit exposure of a Logic App. Learn more at: https://aka.ms/app-service-private-endpoint.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONDeny-LogicApp-Public-Network.alz_policy_definition.json · 64 lines
{
"name": "Deny-LogicApp-Public-Network",
"properties": {
"description": "Disabling public network access improves security by ensuring that the Logic App is not exposed on the public internet. Creating private endpoints can limit exposure of a Logic App. Learn more at: https://aka.ms/app-service-private-endpoint.",
"displayName": "Logic apps should disable public network access",
"metadata": {
"alzCloudEnvironments": [
"AzureCloud",
"AzureChinaCloud",
"AzureUSGovernment"
],
"category": "Logic Apps",
"source": "https://github.com/Azure/Enterprise-Scale/",
"version": "1.0.0"
},
"mode": "All",
"parameters": {
"effect": {
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Deny",
"metadata": {
"description": "Enable or disable the execution of the policy",
"displayName": "Effect"
},
"type": "String"
}
},
"policyRule": {
"if": {
"allOf": [
{
"equals": "Microsoft.Web/sites",
"field": "type"
},
{
"contains": "workflowapp",
"field": "kind"
},
{
"anyOf": [
{
"exists": "false",
"field": "Microsoft.Web/sites/publicNetworkAccess"
},
{
"field": "Microsoft.Web/sites/publicNetworkAccess",
"notEquals": "Disabled"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"policyType": "Custom"
},
"type": "Microsoft.Authorization/policyDefinitions"
}BylawDeny-LogicApp-Public-Network.bylaw.ps1 · 36 lines
# Converted from Deny-LogicApp-Public-Network.alz_policy_definition.json by ConvertTo-Bylaw.
Policy 'Deny-LogicApp-Public-Network' {
Properties @{
DisplayName = 'Logic apps should disable public network access'
Description = 'Disabling public network access improves security by ensuring that the Logic App is not exposed on the public internet. Creating private endpoints can limit exposure of a Logic App. Learn more at: https://aka.ms/app-service-private-endpoint.'
Category = 'Logic Apps'
Version = '1.0.0'
Mode = 'All'
Metadata = [ordered]@{ alzCloudEnvironments = @('AzureCloud', 'AzureChinaCloud', 'AzureUSGovernment'); source = 'https://github.com/Azure/Enterprise-Scale/' }
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Deny'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Web/sites' {
When {
Field kind | Must -ContainText 'workflowapp'
}
Require 'publicNetworkAccess exists' {
Field publicNetworkAccess | Must -Exist
}
Require 'publicNetworkAccess is Disabled' {
Field publicNetworkAccess | Must -Be 'Disabled'
}
}
Effect (Param Effect)
}Source: policy_definitions/Deny-LogicApp-Public-Network.alz_policy_definition.json in Azure/Azure-Landing-Zones-Library, under the MIT licence.
Bylaw