Gallery › Machine Learning › Azure built-in policies
Azure Machine Learning Computes should have local authentication methods disabled
Converted Policy Audit Deny Disabled Mode All Version 2.1.0
Disabling local authentication methods improves security by ensuring that Machine Learning Computes require Azure Active Directory identities exclusively for authentication. Learn more at: https://aka.ms/azure-ml-aad-policy.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONDisableLocalAuth_Audit.json · 58 lines
{
"properties": {
"displayName": "Azure Machine Learning Computes should have local authentication methods disabled",
"policyType": "BuiltIn",
"mode": "All",
"description": "Disabling local authentication methods improves security by ensuring that Machine Learning Computes require Azure Active Directory identities exclusively for authentication. Learn more at: https://aka.ms/azure-ml-aad-policy.",
"metadata": {
"version": "2.1.0",
"category": "Machine Learning"
},
"version": "2.1.0",
"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.MachineLearningServices/workspaces/computes"
},
{
"field": "Microsoft.MachineLearningServices/workspaces/computes/computeType",
"in": [
"ComputeInstance",
"AmlCompute"
]
},
{
"field": "Microsoft.MachineLearningServices/workspaces/computes/disableLocalAuth",
"notEquals": true
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"2.1.0",
"2.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/e96a9a5f-07ca-471b-9bc5-6a0f33cbd68f",
"name": "e96a9a5f-07ca-471b-9bc5-6a0f33cbd68f"
}Bylawe96a9a5f-07ca-471b-9bc5-6a0f33cbd68f.bylaw.ps1 · 32 lines
# Converted from DisableLocalAuth_Audit.json by ConvertTo-Bylaw.
Policy 'e96a9a5f-07ca-471b-9bc5-6a0f33cbd68f' {
Properties @{
DisplayName = 'Azure Machine Learning Computes should have local authentication methods disabled'
Description = 'Disabling local authentication methods improves security by ensuring that Machine Learning Computes require Azure Active Directory identities exclusively for authentication. Learn more at: https://aka.ms/azure-ml-aad-policy.'
Version = '2.1.0'
Category = 'Machine Learning'
PolicyVersion = '2.1.0'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.MachineLearningServices/workspaces/computes' {
When {
Field computeType | Must -BeIn @('ComputeInstance', 'AmlCompute')
}
Require 'disableLocalAuth is true' {
Field disableLocalAuth | Must -Be $true
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Machine Learning/DisableLocalAuth_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw