Bylaw

Gallery › Azure Active Directory › Azure built-in policies

Azure Active Directory Domain Services managed domains should use TLS 1.2 only mode

Converted Policy Audit Deny Disabled Mode Indexed Version 1.1.0

Use TLS 1.2 only mode for your managed domains. By default, Azure AD Domain Services enables the use of ciphers such as NTLM v1 and TLS v1. These ciphers may be required for some legacy applications, but are considered weak and can be disabled if you don't need them. When TLS 1.2 only mode is enabled, any client making a request that is not using TLS 1.2 will fail. Learn more at https://docs.microsoft.com/azure/active-directory-domain-services/secure-your-domain.

ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.

Azure Policy JSONAADDomainServices_TLS_Audit.json · 50 lines
{
  "properties": {
    "displayName": "Azure Active Directory Domain Services managed domains should use TLS 1.2 only mode",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "Use TLS 1.2 only mode for your managed domains. By default, Azure AD Domain Services enables the use of ciphers such as NTLM v1 and TLS v1. These ciphers may be required for some legacy applications, but are considered weak and can be disabled if you don't need them. When TLS 1.2 only mode is enabled, any client making a request that is not using TLS 1.2 will fail. Learn more at https://docs.microsoft.com/azure/active-directory-domain-services/secure-your-domain.",
    "metadata": {
      "version": "1.1.0",
      "category": "Azure Active Directory"
    },
    "version": "1.1.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.AAD/domainServices"
          },
          {
            "field": "Microsoft.AAD/domainServices/domainSecuritySettings.tlsV1",
            "notEquals": "Disabled"
          }
        ]
      },
      "then": {
        "effect": "[parameters('effect')]"
      }
    },
    "versions": [
      "1.1.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/3aa87b5a-7813-4b57-8a43-42dd9df5aaa7",
  "name": "3aa87b5a-7813-4b57-8a43-42dd9df5aaa7"
}
Bylaw3aa87b5a-7813-4b57-8a43-42dd9df5aaa7.bylaw.ps1 · 28 lines
# Converted from AADDomainServices_TLS_Audit.json by ConvertTo-Bylaw.
Policy '3aa87b5a-7813-4b57-8a43-42dd9df5aaa7' {

    Properties @{
        DisplayName   = 'Azure Active Directory Domain Services managed domains should use TLS 1.2 only mode'
        Description   = 'Use TLS 1.2 only mode for your managed domains. By default, Azure AD Domain Services enables the use of ciphers such as NTLM v1 and TLS v1. These ciphers may be required for some legacy applications, but are considered weak and can be disabled if you don''t need them. When TLS 1.2 only mode is enabled, any client making a request that is not using TLS 1.2 will fail. Learn more at https://docs.microsoft.com/azure/active-directory-domain-services/secure-your-domain.'
        Version       = '1.1.0'
        Category      = 'Azure Active Directory'
        PolicyVersion = '1.1.0'
        Mode          = 'Indexed'
    }

    Parameter Effect @{
        AllowedValues = @('Audit', 'Deny', 'Disabled')
        Default       = 'Audit'
        DisplayName   = 'Effect'
        Description   = 'Enable or disable the execution of the policy'
    }

    Resource 'Microsoft.AAD/domainServices' {

        Require 'domainSecuritySettings.tlsV1 is Disabled' {
            Field domainSecuritySettings.tlsV1 | Must -Be 'Disabled'
        }
    }

    Effect (Param Effect)
}

Source: built-in-policies/policyDefinitions/Azure Active Directory/AADDomainServices_TLS_Audit.json in Azure/azure-policy, under the MIT licence.