You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/batch-inference/how-to-authenticate-batch-endpoint.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,15 @@ ms.custom: devplatv2
15
15
16
16
# Authentication on batch endpoints
17
17
18
-
Batch endpoints support Azure Active Directory authentication, or `aad_token`. That means that in order to invoke a batch endpoint, the user must present a valid Azure Active Directory authentication token to the batch endpoint URI. Authorization is enforced at the endpoint level. The following article explains how to correctly interact with batch endpoints and the security requirements for it.
18
+
Batch endpoints support Azure Active Directory authentication, or `aad_token`. That means that in order to invoke a batch endpoint, the user must present a valid Azure Active Directory authentication token to the batch endpoint URI. Authorization is enforced at the endpoint level. The following article explains how to correctly interact with batch endpoints and the security requirements for it.
19
19
20
20
## Prerequisites
21
21
22
22
* This example assumes that you have a model correctly deployed as a batch endpoint. Particularly, we are using the *heart condition classifier* created in the tutorial [Using MLflow models in batch deployments](how-to-mlflow-batch.md).
23
23
24
24
## How authentication works
25
25
26
-
To invoke a batch endpoint, the user must present a valid Azure Active Directory token representing a security principal. This principal can be a __user principal__ or a __service principal__. In any case, once an endpoint is invoked, a batch deployment job is created under the identity associated with the token. The identity needs the following permissions in order to successfully create a job:
26
+
To invoke a batch endpoint, the user must present a valid Azure Active Directory token representing a __security principal__. This principal can be a __user principal__ or a __service principal__. In any case, once an endpoint is invoked, a batch deployment job is created under the identity associated with the token. The identity needs the following permissions in order to successfully create a job:
27
27
28
28
> [!div class="checklist"]
29
29
> * Read batch endpoints/deployments.
@@ -91,7 +91,7 @@ In this case, we want to execute a batch endpoint using the identity of the user
91
91
92
92
# [REST](#tab/rest)
93
93
94
-
When working with REST APIs, we recommend to using either a service principal or a managed identity to interact with the API.
94
+
When working with REST APIs, we recommend to using either a [service principal](#running-jobs-using-a-service-principal) or a [managed identity](#running-jobs-using-a-managed-identity) to interact with the API.
95
95
96
96
---
97
97
@@ -151,9 +151,14 @@ You can use the REST API of Azure Machine Learning to start a batch endpoints jo
@@ -189,6 +194,8 @@ You can use the REST API of Azure Machine Learning to start a batch endpoints jo
189
194
190
195
### Running jobs using a managed identity
191
196
197
+
You can use managed identities to invoke batch endpoint and deployments. Please notice that this manage identity doesn't belong to the batch endpoint, but it is the identity used to execute the endpoint and hence create a batch job. Both user assigned and system assigned identities can be use in this scenario.
198
+
192
199
# [Azure ML CLI](#tab/cli)
193
200
194
201
On resources configured for managed identities for Azure resources, you can sign in using the managed identity. Signing in with the resource's identity is done through the `--identity` flag.
0 commit comments