Gallery › Service Bus › Azure built-in policies
Azure Service Bus namespaces should have local authentication methods disabled
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.1
Disabling local authentication methods improves security by ensuring that Azure Service Bus namespaces exclusively require Microsoft Entra ID identities for authentication. Learn more at: https://aka.ms/disablelocalauth-sb.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONDisableLocalAuth_AuditDeny.json · 51 lines
{
"properties": {
"displayName": "Azure Service Bus namespaces should have local authentication methods disabled",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Disabling local authentication methods improves security by ensuring that Azure Service Bus namespaces exclusively require Microsoft Entra ID identities for authentication. Learn more at: https://aka.ms/disablelocalauth-sb.",
"metadata": {
"version": "1.0.1",
"category": "Service Bus"
},
"version": "1.0.1",
"parameters": {
"effect": {
"type": "String",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.ServiceBus/namespaces"
},
{
"field": "Microsoft.ServiceBus/namespaces/disableLocalAuth",
"notEquals": true
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.1",
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/cfb11c26-f069-4c14-8e36-56c394dae5af",
"name": "cfb11c26-f069-4c14-8e36-56c394dae5af"
}Bylawcfb11c26-f069-4c14-8e36-56c394dae5af.bylaw.ps1 · 28 lines
# Converted from DisableLocalAuth_AuditDeny.json by ConvertTo-Bylaw.
Policy 'cfb11c26-f069-4c14-8e36-56c394dae5af' {
Properties @{
DisplayName = 'Azure Service Bus namespaces should have local authentication methods disabled'
Description = 'Disabling local authentication methods improves security by ensuring that Azure Service Bus namespaces exclusively require Microsoft Entra ID identities for authentication. Learn more at: https://aka.ms/disablelocalauth-sb.'
Version = '1.0.1'
Category = 'Service Bus'
PolicyVersion = '1.0.1'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.ServiceBus/namespaces' {
Require 'disableLocalAuth is true' {
Field disableLocalAuth | Must -Be $true
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Service Bus/DisableLocalAuth_AuditDeny.json in Azure/azure-policy, under the MIT licence.
Bylaw