Gallery › Machine Learning › Azure built-in policies
Azure Machine Learning Workspaces should disable public network access
Converted Policy Audit Deny Disabled Mode Indexed Version 2.0.1
Disabling public network access improves security by ensuring that the Machine Learning Workspaces aren't exposed on the public internet. You can control exposure of your workspaces by creating private endpoints instead. Learn more at: https://learn.microsoft.com/azure/machine-learning/how-to-configure-private-link?view=azureml-api-2&tabs=azure-portal.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONWorkspace_PublicNetworkAccessDisabled_Audit.json · 58 lines
{
"properties": {
"displayName": "Azure Machine Learning Workspaces should disable public network access",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Disabling public network access improves security by ensuring that the Machine Learning Workspaces aren't exposed on the public internet. You can control exposure of your workspaces by creating private endpoints instead. Learn more at: https://learn.microsoft.com/azure/machine-learning/how-to-configure-private-link?view=azureml-api-2&tabs=azure-portal.",
"metadata": {
"version": "2.0.1",
"category": "Machine Learning"
},
"version": "2.0.1",
"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.MachineLearningServices/workspaces"
},
{
"anyOf": [
{
"field": "Microsoft.MachineLearningServices/workspaces/publicNetworkAccess",
"exists": "false"
},
{
"field": "Microsoft.MachineLearningServices/workspaces/publicNetworkAccess",
"notEquals": "Disabled"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"2.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/438c38d2-3772-465a-a9cc-7a6666a275ce",
"name": "438c38d2-3772-465a-a9cc-7a6666a275ce"
}Bylaw438c38d2-3772-465a-a9cc-7a6666a275ce.bylaw.ps1 · 32 lines
# Converted from Workspace_PublicNetworkAccessDisabled_Audit.json by ConvertTo-Bylaw.
Policy '438c38d2-3772-465a-a9cc-7a6666a275ce' {
Properties @{
DisplayName = 'Azure Machine Learning Workspaces should disable public network access'
Description = 'Disabling public network access improves security by ensuring that the Machine Learning Workspaces aren''t exposed on the public internet. You can control exposure of your workspaces by creating private endpoints instead. Learn more at: https://learn.microsoft.com/azure/machine-learning/how-to-configure-private-link?view=azureml-api-2&tabs=azure-portal.'
Version = '2.0.1'
Category = 'Machine Learning'
PolicyVersion = '2.0.1'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.MachineLearningServices/workspaces' {
Require 'publicNetworkAccess exists' {
Field publicNetworkAccess | Must -Exist
}
Require 'publicNetworkAccess is Disabled' {
Field publicNetworkAccess | Must -Be 'Disabled'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Machine Learning/Workspace_PublicNetworkAccessDisabled_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw