Enforce namespaces to minimum use TLS 1.2 version
March 21, 2025 ยท View on GitHub
SYNOPSIS
Service Bus namespaces should reject TLS versions older than 1.2.
DESCRIPTION
Clients connect to Azure Service Bus to send and receive messages over a Transport Layer Security (TLS) encrypted connection. The minimum version of TLS that Service Bus accepts is configurable. Older TLS versions are no longer considered secure by industry standards, such as PCI DSS. Additionally, support for TLS 1.0 and 1.1 are on a deprecation path across Azure services.
Azure lets you disable outdated protocols and require connections to use a minimum of TLS 1.2. By default, TLS 1.0, TLS 1.1, and TLS 1.2 are accepted.
When clients connect using an older version of TLS that is disabled, the connection will fail.
RECOMMENDATION
Consider configuring the minimum supported TLS version for Service Bus clients to be 1.2. Also consider enforcing this setting using Azure Policy.
EXAMPLES
Configure with Azure template
To deploy namespaces that pass this rule:
- Set the
properties.minimumTlsVersionproperty to1.2.
For example:
{
"type": "Microsoft.ServiceBus/namespaces",
"apiVersion": "2022-10-01-preview",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"identity": {
"type": "SystemAssigned"
},
"sku": {
"name": "Standard"
},
"properties": {
"disableLocalAuth": true,
"minimumTlsVersion": "1.2"
}
}
Configure with Bicep
To deploy namespaces that pass this rule:
- Set the
properties.minimumTlsVersionproperty to1.2.
For example:
resource ns 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
name: name
location: location
identity: {
type: 'SystemAssigned'
}
sku: {
name: 'Standard'
}
properties: {
disableLocalAuth: true
minimumTlsVersion: '1.2'
}
}
Configure with Azure CLI
az servicebus namespace update -n '<name>' -g '<resource_group>' --minimum-tls-version '1.2'
Configure with Azure PowerShell
$ns = Get-AzServiceBusNamespace -Name '<name>' -ResourceGroupName '<resource_group>'
Set-AzServiceBusNamespace -InputObject $ns -MinimumTlsVersion '1.2'