Skip to content

Commit 3014521

Browse files
committed
writing
1 parent d957caf commit 3014521

File tree

1 file changed

+47
-7
lines changed

1 file changed

+47
-7
lines changed

articles/machine-learning/how-to-integrate-azure-policy.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure Machine Learning
44
description: Learn how to use Azure Policy to use built-in policies for Azure Machine Learning to make sure your workspaces are compliant with your requirements.
55
author: Blackmist
66
ms.author: larryfr
7-
ms.date: 04/01/2024
7+
ms.date: 08/30/2024
88
services: machine-learning
99
ms.service: azure-machine-learning
1010
ms.subservice: enterprise-readiness
@@ -22,7 +22,7 @@ As a platform administrator, you can use policies to lay out guardrails for team
2222

2323
[Azure Policy](/azure/governance/policy/) is a governance tool that allows you to ensure that Azure resources are compliant with your policies.
2424

25-
Azure Policy provides a set of policies that you can use for common scenarios with Azure Machine Learning. You can assign these policy definitions to your existing subscription or use them as the basis to create your own custom definitions.
25+
Azure Policy provides a set of policies that you can use for common scenarios with Azure Machine Learning. You can assign these policy definitions to your existing subscription or use them as the basis to create your own [custom definitions](#create-custom-definitions).
2626

2727
The following table lists the built-in policies you can assign with Azure Machine Learning. For a list of all Azure built-in policies, see [Built-in policies](/azure/governance/policy/samples/built-in-policies).
2828

@@ -52,7 +52,7 @@ Landing zones are an architectural pattern that accounts for scale, governance,
5252

5353
The purpose of the landing zone is to ensure that all infrastructure configuration work is done when a team starts in the Azure environment. For instance, security controls are set up in compliance with organizational standards and network connectivity is set up.
5454

55-
Using the landing zones pattern, machine learning teams can deploy and manage their own resources on a self-service basis. By using Azure policy as an administrator, you can audit and manage Azure resources for compliance.
55+
When you use the landing zones pattern, machine learning teams can deploy and manage their own resources on a self-service basis. By using Azure policy as an administrator, you can audit and manage Azure resources for compliance.
5656

5757
Azure Machine Learning integrates with [data landing zones](https://github.com/Azure/data-landing-zone) in the [Cloud Adoption Framework data management and analytics scenario](/azure/cloud-adoption-framework/scenarios/data-management/). This reference implementation provides an optimized environment to migrate machine learning workloads onto Azure Machine Learning and includes preconfigured policies.
5858

@@ -120,15 +120,15 @@ If the policy is set to __Deny__, then you can't create a workspace unless it us
120120

121121
Controls whether a workspace is created using a system-assigned managed identity (default) or a user-assigned managed identity. The managed identity for the workspace is used to access associated resources such as Azure Storage, Azure Container Registry, Azure Key Vault, and Azure Application Insights. For more information, see [Set up authentication between Azure Machine Learning and other services](how-to-identity-based-service-authentication.md).
122122

123-
To configure this policy, set the effect parameter to __Audit__, __Deny__, or __Disabled__. If set to __Audit__, you can create a workspace without specifying a user-assigned managed identity. A system-assigned identity is used and a warning event is created in the activity log.
123+
To configure this policy, set the effect parameter to __Audit__, __Deny__, or __Disabled__. If set to __Audit__, you can create a workspace without specifying a user-assigned managed identity. A system-assigned identity is used, and a warning event is created in the activity log.
124124

125125
If the policy is set to __Deny__, then you can't create a workspace unless you provide a user-assigned identity during the creation process. Attempting to create a workspace without providing a user-assigned identity results in an error. The error is also logged to the activity log. The policy identifier is returned as part of this error.
126126

127127
### Configure computes to modify/disable local authentication
128128

129129
This policy modifies any Azure Machine Learning compute cluster or instance creation request to disable local authentication (SSH).
130130

131-
To configure this policy, set the effect parameter to __Modify__ or __Disabled__. If set __Modify__, any creation of a compute cluster or instance within the scope where the policy applies will automatically have local authentication disabled.
131+
To configure this policy, set the effect parameter to __Modify__ or __Disabled__. If set __Modify__, any creation of a compute cluster or instance within the scope where the policy applies automatically has local authentication disabled.
132132

133133
### Configure workspace to use private DNS zones
134134

@@ -138,9 +138,9 @@ To configure this policy, set the effect parameter to __DeployIfNotExists__. Set
138138

139139
### Configure workspaces to disable public network access
140140

141-
Configures a workspace to disable network access from the public internet. This helps protect the workspaces against data leakage risks. You can instead access your workspace by creating private endpoints. For more information, see [Configure a private endpoint for an Azure Machine Learning workspace](how-to-configure-private-link.md).
141+
Configures a workspace to disable network access from the public internet. Disabling public network access helps protect the workspaces against data leakage risks. You can instead access your workspace by creating private endpoints. For more information, see [Configure a private endpoint for an Azure Machine Learning workspace](how-to-configure-private-link.md).
142142

143-
To configure this policy, set the effect parameter to __Modify__ or __Disabled__. If set to __Modify__, any creation of a workspace within the scope where the policy applies will automatically have public network access disabled.
143+
To configure this policy, set the effect parameter to __Modify__ or __Disabled__. If set to __Modify__, any creation of a workspace within the scope where the policy applies automatically has public network access disabled.
144144

145145
### Configure workspaces with private endpoints
146146

@@ -160,6 +160,46 @@ Audits whether resource logs are enabled for an Azure Machine Learning workspace
160160

161161
To configure this policy, set the effect parameter to __AuditIfNotExists__ or __Disabled__. If set to __AuditIfNotExists__, the policy audits if resource logs aren't enabled for the workspace.
162162

163+
## Create custom definitions
164+
165+
When you need to create custom policies for your organization, you can use the [Azure Policy definition structure](/azure/governance/policy/definition-structure) to create your own definitions. You can use the [Azure Policy Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=AzurePolicy.azurepolicyextension) to author and test your policies.
166+
167+
To discover the policy aliases you can use in your definition, use the following Azure CLI command to list the aliases for Azure Machine Learning:
168+
169+
```azurecli
170+
az provider show --namespace Microsoft.MachineLearningServices --expand "resourceTypes/aliases" --query "resourceTypes[].aliases[].name"
171+
```
172+
173+
To discover the allowed values for a specific alias, visit the [Azure Machine Learning REST API](/rest/api/azureml/) reference.
174+
175+
For a tutorial (not Azure Machine Learning specific) on how to create custom policies, visit [Create a custom policy definition](/azure/governance/policy/tutorials/create-custom-policy-definition).
176+
177+
### How to find values to use in policies
178+
179+
### Example: Block serverless spark compute jobs
180+
181+
```json
182+
{
183+
"mode": "All",
184+
"policyRule": {
185+
"if": {
186+
"allOf": [
187+
{
188+
"field": "Microsoft.MachineLearningServices/workspaces/jobs/jobType",
189+
"in": [
190+
"Spark"
191+
]
192+
}
193+
]
194+
},
195+
"then": {
196+
"effect": "Deny"
197+
}
198+
},
199+
"parameters": {}
200+
}
201+
```
202+
163203
## Related content
164204

165205
* [Azure Policy documentation](/azure/governance/policy/overview)

0 commit comments

Comments
 (0)