Gallery › Guest Configuration › Azure built-in policies
Configure secure communication protocols(TLS 1.1 or TLS 1.2) on Windows machine(including prerequisites)
Converted Initiative Version 1.0.0
Creates a Guest Configuration assignment(including prerequisites) to configure specified secure protocol version(TLS 1.1 or TLS 1.2) on Windows machine. For details, visit https://aka.ms/SetSecureProtocol
ConvertTo-Bylaw converted this initiative, and proved that the file compiles back to the same definition.
Azure Policy JSONSetSecureProtocol.json · 101 lines
{
"properties": {
"displayName": "Configure secure communication protocols(TLS 1.1 or TLS 1.2) on Windows machine(including prerequisites)",
"policyType": "BuiltIn",
"description": "Creates a Guest Configuration assignment(including prerequisites) to configure specified secure protocol version(TLS 1.1 or TLS 1.2) on Windows machine. For details, visit https://aka.ms/SetSecureProtocol",
"metadata": {
"category": "Guest Configuration",
"version": "1.0.0"
},
"version": "1.0.0",
"parameters": {
"IncludeArcMachines": {
"type": "string",
"metadata": {
"displayName": "Include Arc connected servers",
"description": "By selecting this option, you agree to be charged monthly per Arc connected machine.",
"portalReview": "true"
},
"allowedValues": [
"true",
"false"
],
"defaultValue": "false"
},
"MinimumServerTLSVersion": {
"type": "string",
"metadata": {
"displayName": "Minimum Server TLS version",
"description": "The minimum server TLS protocol version that should be enabled. Windows servers with lower server TLS versions will be set to desired version.",
"portalReview": "true"
},
"allowedValues": [
"1.1",
"1.2"
],
"defaultValue": "1.2"
},
"MinimumClientTLSVersion": {
"type": "string",
"metadata": {
"displayName": "Minimum Client TLS version",
"description": "The minimum client TLS protocol version that should be enabled. Windows servers with lower client TLS versions will be set to desired version.",
"portalReview": "true"
},
"allowedValues": [
"1.1",
"1.2"
],
"defaultValue": "1.2"
},
"effect": {
"type": "string",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of this policy"
},
"allowedValues": [
"DeployIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists"
}
},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/f40c7c00-b4e3-4068-a315-5fe81347a904",
"definitionVersion": "2.*.*-preview",
"policyDefinitionReferenceId": "Prerequisite_AddUserIdentity"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/385f5831-96d4-41db-9a3c-cd3af78aaae6",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "Prerequisite_DeployExtensionWindows"
},
{
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/828ba269-bf7f-4082-83dd-633417bc391d",
"definitionVersion": "1.*.*",
"policyDefinitionReferenceId": "GuestConfiguration_SetSecureProtocol",
"parameters": {
"MinimumServerTLSVersion": {
"value": "[parameters('MinimumServerTLSVersion')]"
},
"MinimumClientTLSVersion": {
"value": "[parameters('MinimumClientTLSVersion')]"
},
"IncludeArcMachines": {
"value": "[parameters('IncludeArcMachines')]"
},
"effect": {
"value": "[parameters('effect')]"
}
}
}
],
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policySetDefinitions/ee6f9c39-ca6c-4937-b5b7-f6d9775a6f17",
"name": "ee6f9c39-ca6c-4937-b5b7-f6d9775a6f17"
}Bylawee6f9c39-ca6c-4937-b5b7-f6d9775a6f17.bylaw.ps1 · 70 lines
# Converted from SetSecureProtocol.json by ConvertTo-Bylaw.
Initiative 'ee6f9c39-ca6c-4937-b5b7-f6d9775a6f17' {
Properties @{
DisplayName = 'Configure secure communication protocols(TLS 1.1 or TLS 1.2) on Windows machine(including prerequisites)'
Description = 'Creates a Guest Configuration assignment(including prerequisites) to configure specified secure protocol version(TLS 1.1 or TLS 1.2) on Windows machine. For details, visit https://aka.ms/SetSecureProtocol'
Category = 'Guest Configuration'
Version = '1.0.0'
PolicyVersion = '1.0.0'
}
Parameter IncludeArcMachines @{
Type = 'string'
AllowedValues = @('true', 'false')
Default = 'false'
DisplayName = 'Include Arc connected servers'
Description = 'By selecting this option, you agree to be charged monthly per Arc connected machine.'
JsonName = 'IncludeArcMachines'
Metadata = [ordered]@{ portalReview = 'true' }
}
Parameter MinimumServerTLSVersion @{
Type = 'string'
AllowedValues = @('1.1', '1.2')
Default = '1.2'
DisplayName = 'Minimum Server TLS version'
Description = 'The minimum server TLS protocol version that should be enabled. Windows servers with lower server TLS versions will be set to desired version.'
JsonName = 'MinimumServerTLSVersion'
Metadata = [ordered]@{ portalReview = 'true' }
}
Parameter MinimumClientTLSVersion @{
Type = 'string'
AllowedValues = @('1.1', '1.2')
Default = '1.2'
DisplayName = 'Minimum Client TLS version'
Description = 'The minimum client TLS protocol version that should be enabled. Windows servers with lower client TLS versions will be set to desired version.'
JsonName = 'MinimumClientTLSVersion'
Metadata = [ordered]@{ portalReview = 'true' }
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('DeployIfNotExists', 'Disabled')
Default = 'DeployIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of this policy'
}
PolicyDefinition @{
Id = 'f40c7c00-b4e3-4068-a315-5fe81347a904'
ReferenceId = 'Prerequisite_AddUserIdentity'
Version = '2.*.*-preview'
}
PolicyDefinition @{
Id = '385f5831-96d4-41db-9a3c-cd3af78aaae6'
ReferenceId = 'Prerequisite_DeployExtensionWindows'
Version = '1.*.*'
}
PolicyDefinition @{
Id = '828ba269-bf7f-4082-83dd-633417bc391d'
ReferenceId = 'GuestConfiguration_SetSecureProtocol'
Version = '1.*.*'
Parameters = [ordered]@{
MinimumServerTLSVersion = (Param MinimumServerTLSVersion)
MinimumClientTLSVersion = (Param MinimumClientTLSVersion)
IncludeArcMachines = (Param IncludeArcMachines)
effect = (Param Effect)
}
}
}Members (3)
- [Preview]: Add user-assigned managed identity to enable Guest Configuration assignments on virtual machines
- Deploy the Windows Guest Configuration extension to enable Guest Configuration assignments on Windows VMs
- Configure secure communication protocols(TLS 1.1 or TLS 1.2) on Windows machines
Source: built-in-policies/policySetDefinitions/Guest Configuration/SetSecureProtocol.json in Azure/azure-policy, under the MIT licence.
Bylaw