Gallery › Bot Service › Azure built-in policies
Bot Service should have isolated mode enabled
Converted Policy Audit Deny Disabled Mode Indexed Version 2.1.0
Bots should be set to 'isolated only' mode. This setting configures Bot Service channels that require traffic over the public internet to be disabled.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONNetworkIsolatedEnabled_Audit.json · 53 lines
{
"properties": {
"displayName": "Bot Service should have isolated mode enabled",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Bots should be set to 'isolated only' mode. This setting configures Bot Service channels that require traffic over the public internet to be disabled.",
"metadata": {
"version": "2.1.0",
"category": "Bot Service"
},
"version": "2.1.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "The desired effect of the policy."
},
"allowedValues": [
"audit",
"Audit",
"deny",
"Deny",
"disabled",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.BotService/botServices"
},
{
"field": "Microsoft.BotService/botServices/publicNetworkAccess",
"notEquals": "Disabled"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"2.1.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/52152f42-0dda-40d9-976e-abb1acdd611e",
"name": "52152f42-0dda-40d9-976e-abb1acdd611e"
}Bylaw52152f42-0dda-40d9-976e-abb1acdd611e.bylaw.ps1 · 28 lines
# Converted from NetworkIsolatedEnabled_Audit.json by ConvertTo-Bylaw.
Policy '52152f42-0dda-40d9-976e-abb1acdd611e' {
Properties @{
DisplayName = 'Bot Service should have isolated mode enabled'
Description = 'Bots should be set to ''isolated only'' mode. This setting configures Bot Service channels that require traffic over the public internet to be disabled.'
Version = '2.1.0'
Category = 'Bot Service'
PolicyVersion = '2.1.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('audit', 'Audit', 'deny', 'Deny', 'disabled', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'The desired effect of the policy.'
}
Resource 'Microsoft.BotService/botServices' {
Require 'publicNetworkAccess is Disabled' {
Field publicNetworkAccess | Must -Be 'Disabled'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Bot Service/NetworkIsolatedEnabled_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw