Gallery › CDN › Azure built-in policies
Azure Front Door Standard and Premium should be running minimum TLS version of 1.2
Converted Policy Audit Deny Disabled Mode All Version 1.0.0
Setting minimal TLS version to 1.2 improves security by ensuring your custom domains are accessed from clients using TLS 1.2 or newer. Using versions of TLS less than 1.2 is not recommended since they are weak and do not support modern cryptographic algorithms.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONAFD_Standard_Premium_MinimumTls_Audit.json · 50 lines
{
"properties": {
"displayName": "Azure Front Door Standard and Premium should be running minimum TLS version of 1.2",
"description": "Setting minimal TLS version to 1.2 improves security by ensuring your custom domains are accessed from clients using TLS 1.2 or newer. Using versions of TLS less than 1.2 is not recommended since they are weak and do not support modern cryptographic algorithms.",
"metadata": {
"version": "1.0.0",
"category": "CDN"
},
"version": "1.0.0",
"policyType": "BuiltIn",
"mode": "All",
"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.Cdn/profiles/customDomains"
},
{
"field": "Microsoft.Cdn/profiles/customDomains/tlsSettings.minimumTlsVersion",
"notEquals": "TLS12"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/679da822-78a7-4eff-8fff-a899454a9970",
"name": "679da822-78a7-4eff-8fff-a899454a9970"
}Bylaw679da822-78a7-4eff-8fff-a899454a9970.bylaw.ps1 · 28 lines
# Converted from AFD_Standard_Premium_MinimumTls_Audit.json by ConvertTo-Bylaw.
Policy '679da822-78a7-4eff-8fff-a899454a9970' {
Properties @{
DisplayName = 'Azure Front Door Standard and Premium should be running minimum TLS version of 1.2'
Description = 'Setting minimal TLS version to 1.2 improves security by ensuring your custom domains are accessed from clients using TLS 1.2 or newer. Using versions of TLS less than 1.2 is not recommended since they are weak and do not support modern cryptographic algorithms.'
Version = '1.0.0'
Category = 'CDN'
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Cdn/profiles/customDomains' {
Require 'tlsSettings.minimumTlsVersion is TLS12' {
Field tlsSettings.minimumTlsVersion | Must -Be 'TLS12'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/CDN/AFD_Standard_Premium_MinimumTls_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw