Gallery › Mission › Azure built-in policies
Azure SQL should disable or enforce restrictions for Outbound networking
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.0
This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. It enforces Azure SQL server outbound network restrictions so workloads communicate only through approved private channels and limit lateral movement risk (see https://learn.microsoft.com/azure/azure-sql/database/connectivity-architecture).
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONSqlEnableOutboundNetworkingRestrictions.json · 54 lines
{
"properties": {
"displayName": "Azure SQL should disable or enforce restrictions for Outbound networking",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. It enforces Azure SQL server outbound network restrictions so workloads communicate only through approved private channels and limit lateral movement risk (see https://learn.microsoft.com/azure/azure-sql/database/connectivity-architecture).",
"metadata": {
"version": "1.0.0",
"category": "Mission"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Sql/servers"
},
{
"field": "Microsoft.Sql/servers/restrictOutboundNetworkAccess",
"notEquals": "Enabled"
},
{
"value": "[resourceGroup().managedBy]",
"notContains": "/providers/Microsoft.Synapse/"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/eae5dab1-5078-4686-a091-fce0e1e13d3b",
"name": "eae5dab1-5078-4686-a091-fce0e1e13d3b"
}Bylaweae5dab1-5078-4686-a091-fce0e1e13d3b.bylaw.ps1 · 32 lines
# Converted from SqlEnableOutboundNetworkingRestrictions.json by ConvertTo-Bylaw.
Policy 'eae5dab1-5078-4686-a091-fce0e1e13d3b' {
Properties @{
DisplayName = 'Azure SQL should disable or enforce restrictions for Outbound networking'
Description = 'This policy applies exclusively to Mission Platform products and services; usage outside of these scopes is not supported. It enforces Azure SQL server outbound network restrictions so workloads communicate only through approved private channels and limit lateral movement risk (see https://learn.microsoft.com/azure/azure-sql/database/connectivity-architecture).'
Version = '1.0.0'
Category = 'Mission'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Sql/servers' {
When {
Field restrictOutboundNetworkAccess | Must -Not -Be 'Enabled'
}
Require 'Requirement 1' {
Arm '[resourceGroup().managedBy]' | Must -ContainText '/providers/Microsoft.Synapse/'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Mission/SqlEnableOutboundNetworkingRestrictions.json in Azure/azure-policy, under the MIT licence.
Bylaw