Gallery › App Configuration › Azure built-in policies
Azure App Configuration resources should be associated with an NSP (Network Security Perimeter)
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0
Associating Azure App Configuration resources with an NSP improves the security by ensuring its access is controlled only via NSP access rules.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONNsp_AINE.json · 48 lines
{
"properties": {
"displayName": "Azure App Configuration resources should be associated with an NSP (Network Security Perimeter)",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Associating Azure App Configuration resources with an NSP improves the security by ensuring its access is controlled only via NSP access 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": [
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "AuditIfNotExists"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.AppConfiguration/configurationStores"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.AppConfiguration/configurationStores/networkSecurityPerimeterConfigurations",
"existenceCondition": {
"field": "Microsoft.AppConfiguration/configurationStores/networkSecurityPerimeterConfigurations/networkSecurityPerimeter.id",
"exists": "true"
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/bc5c669d-8fe7-4b64-b570-4ee0a86aa5a8",
"name": "bc5c669d-8fe7-4b64-b570-4ee0a86aa5a8"
}Bylawbc5c669d-8fe7-4b64-b570-4ee0a86aa5a8.bylaw.ps1 · 27 lines
# Converted from Nsp_AINE.json by ConvertTo-Bylaw.
Policy 'bc5c669d-8fe7-4b64-b570-4ee0a86aa5a8' {
Properties @{
DisplayName = 'Azure App Configuration resources should be associated with an NSP (Network Security Perimeter)'
Description = 'Associating Azure App Configuration resources with an NSP improves the security by ensuring its access is controlled only via NSP access rules.'
Version = '1.0.0'
Category = 'App Configuration'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.AppConfiguration/configurationStores'
AuditIfNotExists 'Microsoft.AppConfiguration/configurationStores/networkSecurityPerimeterConfigurations' -Effect (Param Effect) {
Require 'networkSecurityPerimeter.id exists' {
Field networkSecurityPerimeter.id | Must -Exist
}
}
}Source: built-in-policies/policyDefinitions/App Configuration/Nsp_AINE.json in Azure/azure-policy, under the MIT licence.
Bylaw