Gallery › App Configuration › Azure built-in policies
Configure App Configuration public network access property to SecuredByPerimeter
Converted Policy Disabled Modify Mode Indexed Version 1.0.0
Setting the public network access property to SecuredByPerimeter improves security by ensuring your App Configuration can only be accessed via Network Security Perimeter Rules.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONPublicNetworkAccess_SecuredByPerimeter_Modify.json · 62 lines
{
"properties": {
"displayName": "Configure App Configuration public network access property to SecuredByPerimeter",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Setting the public network access property to SecuredByPerimeter improves security by ensuring your App Configuration can only be accessed via Network Security Perimeter Rules.",
"metadata": {
"version": "1.0.0",
"category": "App Configuration"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Modify",
"Disabled"
],
"defaultValue": "Modify"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.AppConfiguration/configurationStores"
},
{
"field": "Microsoft.AppConfiguration/configurationStores/publicNetworkAccess",
"notEquals": "SecuredByPerimeter"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/fe86443c-f201-4fc4-9d2a-ac61149fbda0"
],
"conflictEffect": "audit",
"operations": [
{
"operation": "addOrReplace",
"field": "Microsoft.AppConfiguration/configurationStores/publicNetworkAccess",
"value": "SecuredByPerimeter"
}
]
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/9718f0f0-9cf7-4c37-b7b0-13b872fb8937",
"name": "9718f0f0-9cf7-4c37-b7b0-13b872fb8937"
}Bylaw9718f0f0-9cf7-4c37-b7b0-13b872fb8937.bylaw.ps1 · 30 lines
# Converted from PublicNetworkAccess_SecuredByPerimeter_Modify.json by ConvertTo-Bylaw.
Policy '9718f0f0-9cf7-4c37-b7b0-13b872fb8937' {
Properties @{
DisplayName = 'Configure App Configuration public network access property to SecuredByPerimeter'
Description = 'Setting the public network access property to SecuredByPerimeter improves security by ensuring your App Configuration can only be accessed via Network Security Perimeter Rules.'
Version = '1.0.0'
Category = 'App Configuration'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Modify', 'Disabled')
Default = 'Modify'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.AppConfiguration/configurationStores' {
Require 'publicNetworkAccess is SecuredByPerimeter' {
Field publicNetworkAccess | Must -Be 'SecuredByPerimeter'
}
}
Modify -Role 'App Configuration Contributor' -ConflictEffect Audit -Effect (Param Effect) {
Field publicNetworkAccess | AddOrReplace 'SecuredByPerimeter'
}
}Source: built-in-policies/policyDefinitions/App Configuration/PublicNetworkAccess_SecuredByPerimeter_Modify.json in Azure/azure-policy, under the MIT licence.
Bylaw