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/ai-foundry/how-to/disable-local-auth.md
+43-41Lines changed: 43 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: azure-ai-foundry
8
8
ms.custom:
9
9
- ignite-2024
10
10
ms.topic: how-to
11
-
ms.date: 07/14/2025
11
+
ms.date: 10/01/2025
12
12
ms.reviewer: meerakurup
13
13
#customer intent: As an admin, I want to disable shared-key access to my resources to improve security.
14
14
---
@@ -18,9 +18,9 @@ ms.reviewer: meerakurup
18
18
> [!NOTE]
19
19
> The information provided in this article is specific to a [!INCLUDE [hub](../includes/hub-project-name.md)] and doesn't apply to an [!INCLUDE [fdp](../includes/fdp-project-name.md)]. For more information, see [Types of projects](../what-is-azure-ai-foundry.md#project-types).
20
20
21
-
An [Azure AI Foundry](https://ai.azure.com/?cid=learnDocs) hub defaults to use of a shared key to access its default Azure Storage account. With key-based authorization, anyone who has the key and access to the storage account can access data.
21
+
An [Azure AI Foundry](https://ai.azure.com/?cid=learnDocs) hub defaults to using a shared key to access its default Azure Storage account. With key-based authorization, anyone who has the key and access to the storage account can access data.
22
22
23
-
To reduce the risk of unauthorized access, you can disable key-based authorization and instead use Microsoft Entra ID for authorization. This configuration uses a Microsoft Entra ID value to authorize access to the storage account. The identity used to access storage is either the user's identity or a managed identity. The user's identity is used to view data in Azure Machine Learning studio or to run a notebook while authenticated with the user's identity. Machine Learning uses a managed identity to access the storage account. An example is when the managed identity runs a training job.
23
+
To reduce the risk of unauthorized access, disable key-based authorization and instead use Microsoft Entra ID for authorization. This configuration uses a Microsoft Entra ID value to authorize access to the storage account. The identity used to access storage is either the user's identity or a managed identity. The user's identity is used to view data in Azure Machine Learning studio or to run a notebook while authenticated with the user's identity. Machine Learning uses a managed identity to access the storage account - for example, when the managed identity runs a training job.
24
24
25
25
Use of your hub with a shared-key disabled storage account is currently in preview.
26
26
@@ -95,25 +95,27 @@ If you use [Azure Cloud Shell](https://azure.microsoft.com//features/cloud-shell
95
95
96
96
When you create a new hub, the creation process can automatically disable shared-key access. You can also create a storage account, disable shared-key access, and use it during hub creation.
97
97
98
+
This section shows you how to create a hub with identity-based access to the storage account.
99
+
98
100
# [Azure portal](#tab/portal)
99
101
100
-
1. In the Azure portal, search for`Azure AI Foundry`. On the left menu, select **AI Hubs**, andthen select **+ Create**>**Hub**.
102
+
1. In the Azure portal, search for`Azure AI Foundry`. On the left menu, select **AI Hubs**, and select **+ Create**>**Hub**.
101
103
102
104
:::image type="content" source="../media/how-to/hubs/create-hub.png" alt-text="Screenshot that shows the Azure AI Foundry portal." lightbox="../media/how-to/hubs/create-hub.png":::
103
105
104
-
1. On the __Basics__ tab, enter the hub details, andthen select the __Storage__ tab. Select the storage account that you previously created.
106
+
1. On the **Basics** tab, enter the hub details, and select the **Storage** tab. Select the storage account that you previously created.
105
107
106
108
:::image type="content" source="../media/disable-local-auth/ai-hub-storage.png" alt-text="Screenshot that shows hub creation by using the previously created storage account." lightbox="../media/disable-local-auth/ai-hub-storage.png":::
107
109
108
-
1. On the __Identity__ tab, set__Storage account access__ to __Identity-based access__. Then enable __Disable shared key access__.
110
+
1. On the **Identity** tab, set**Storage account access** to **Identity-based access**. Enable **Disable shared key access**.
109
111
110
112
:::image type="content" source="../media/disable-local-auth/ai-hub-identity-based-access.png" alt-text="Screenshot that shows hub creation by using Identity-based storage access." lightbox="../media/disable-local-auth/ai-hub-identity-based-access.png":::
111
113
112
114
1. Continue the hub creation process. As the hub is created, the managed identity is automatically assigned the permissions it needs to access the storage account.
113
115
114
116
# [Python SDK](#tab/python)
115
117
116
-
When you create your hub with the SDK, set`system_datastores_auth_mode="identity"`for the hub. To use a preexisting storage account, use the `storage_account` parameter to specify the Resource Manager ID of an existing storage account:
118
+
When you create your hub with the SDK, set`system_datastores_auth_mode="identity"`for the hub. To use a pre-existing storage account, use the `storage_account` parameter to specify the Resource Manager ID of an existing storage account:
117
119
118
120
```python
119
121
# Creating a unique hub name with current datetime to avoid conflicts
@@ -131,7 +133,7 @@ ws_hub = Hub(
131
133
description="This example shows how to create a Hub",
132
134
hbi_workspace=False,
133
135
tags=dict(purpose="demo"),
134
-
storage_account={existing_storage_account with AllowSharedKeyAccess=false},
136
+
storage_account="{existing_storage_account with AllowSharedKeyAccess=false}",
135
137
system_datastores_auth_mode="identity",
136
138
)
137
139
@@ -141,7 +143,7 @@ print(created_hub)
141
143
142
144
# [Azure CLI](#tab/cli)
143
145
144
-
To create a new hub with Microsoft Entra ID authorization for the storage account, use a YAML configuration file that sets `system_datastores_auth_mode` to `identity`. You can also specify the Resource Manager IDvalue of an existing storage account with the `storage_account` entry.
146
+
To create a new hub with Microsoft Entra ID authorization for the storage account, use a YAML configuration file that sets `system_datastores_auth_mode` to `identity`. You can also specify the Resource Manager ID of an existing storage account with the `storage_account` entry.
145
147
146
148
This example YAMLfile shows how to set the hub to use a managed identity and an existing storage account:
147
149
@@ -151,13 +153,13 @@ name: mlw-basicex-prod
151
153
location: eastus
152
154
display_name: Bring your own dependent resources-example
153
155
description: This configuration specifies a workspace configuration with existing dependent resources
@@ -210,29 +212,29 @@ In the JSON template example, substitute your own values for the following place
210
212
}
211
213
```
212
214
213
-
For information on how to deploy an Azure Resource Manager template (ARM template), see the following articles:
215
+
For information about how to deploy an Azure Resource Manager template (ARM template), see the following articles:
214
216
215
217
- [Tutorial: Deploy a local ARM template by using the Azure CLIor Azure PowerShell](/azure/azure-resource-manager/templates/deployment-tutorial-local-template)
216
218
- [Quickstart: Create and deploy ARM templates by using the Azure portal](/azure/azure-resource-manager/templates/quickstart-create-templates-use-the-portal)
217
219
218
-
After you create the hub, identify all the users who will use it, such as data scientists. The users must be assigned the Storage Blob Data Contributor and Storage File Data Privileged Contributor roles in Azure role-based access control (RBAC) for the storage account. If the users need only read access, use the Storage Blob Data Reader and Storage File Data Privileged Reader roles instead. For more information, see the [Role assignments](#scenarios-for-hub-storage-account-role-assignments) section.
220
+
After you create the hub, identify all the users who'll use it, such as data scientists. The users must be assigned the Storage Blob Data Contributor and Storage File Data Privileged Contributor roles in Azure role-based access control (RBAC) for the storage account. If the users need only read access, use the Storage Blob Data Reader and Storage File Data Privileged Reader roles instead. For more information, see [Role assignments](#scenarios-for-hub-storage-account-role-assignments).
219
221
220
222
---
221
223
222
224
## Update an existing hub
223
225
224
-
If you have an existing Azure AI Foundry hub, use the steps in this section to update the hub to use Microsoft Entra ID to authorize access to the storage account. Then, disable shared-key access on the storage account.
226
+
If you have an existing Azure AI Foundry hub, use the steps in this section to update the hub to use Microsoft Entra ID to authorize access to the storage account. Then disable shared-key access on the storage account.
225
227
226
228
# [Azure portal](#tab/portal)
227
229
228
-
1. Go to the Azure portal and select __AzureAI Foundry hub__.
229
-
1. On the left menu, select __Properties__. At the bottom of the pane, set__Storage account access__ to __Identity-based access__. Select __Save__ at the top of the pane to save the configuration.
230
+
1. Go to the Azure portal and select **AzureAI Foundry hub**.
231
+
1. On the left menu, select **Properties**. At the bottom of the pane, set**Storage account access** to **Identity-based access**. Select **Save** at the top of the pane to save the configuration.
230
232
231
233
:::image type="content" source="../media/disable-local-auth/update-existing-hub-identity-based-access.png" alt-text="Screenshot that shows selection of Identity-based access." lightbox="../media/disable-local-auth/update-existing-hub-identity-based-access.png":::
232
234
233
235
# [Python SDK](#tab/python)
234
236
235
-
To update an existing hub, set`system_datastores_auth_mode = "identity"`for the hub. This code sample shows an update of a hub named `test-ws1`:
237
+
To update an existing hub, set`system_datastores_auth_mode = "identity"`for the hub. The following code sample shows an update of a hub named `test-ws1`:
To update an existing hub, use the `az ml workspace update` command and specify `--system-datastores-auth-mode identity`. This example shows an update of a hub named `myhub`:
248
+
To update an existing hub, use the `az ml workspace update` command and specify `--system-datastores-auth-mode identity`. The following example shows an update of a hub named `myhub`:
247
249
248
250
```azurecli-interactive
249
251
az ml workspace update --name myhub --system-datastores-auth-mode identity
@@ -296,7 +298,7 @@ In the JSON template example, substitute your own values for the following place
296
298
}
297
299
```
298
300
299
-
For information on how to deploy an ARM template, see the following articles:
301
+
For information about how to deploy an ARM template, see the following articles:
300
302
301
303
- [Tutorial: Deploy a local ARM template by using the Azure CLIor Azure PowerShell](/azure/azure-resource-manager/templates/deployment-tutorial-local-template)
302
304
- [Quickstart: Create and deploy ARM templates by using the Azure portal](/azure/azure-resource-manager/templates/quickstart-create-templates-use-the-portal)
@@ -305,25 +307,25 @@ For information on how to deploy an ARM template, see the following articles:
305
307
306
308
### Assign roles to users
307
309
308
-
After you update the hub, update the storage account to disable shared-key access. For more information about how to disable shared-key access, see [Prevent shared-key authorization for an Azure Storage account](/azure/storage/common/shared-key-authorization-prevent).
310
+
After you update the hub, update the storage account to disable shared-key access. For more information, see [Prevent shared-key authorization for an Azure Storage account](/azure/storage/common/shared-key-authorization-prevent).
309
311
310
312
You must also identify all the users who need access to the default datastores, such as data scientists. The users must be assigned the Storage Blob Data Contributor and Storage File Data Privileged Contributor roles in Azure RBACfor the storage account. If the users need only read access, use the Storage Blob Data Reader and Storage File Data Privileged Reader roles instead. For more information, see the [Role assignments](#scenarios-for-hub-storage-account-role-assignments) section.
311
313
312
-
## Revert to use shared keys
314
+
## Revert to using shared keys
313
315
314
-
To revert a hub back to use of shared keys to access the storage account, use the following information.
316
+
To revert a hub back to using shared keys to access the storage account, use the following information.
315
317
316
318
# [Azure portal](#tab/portal)
317
319
318
-
1. To update an existing workspace, go to **Properties**and select **Credential-based access**.
320
+
1. Go to **Properties**and select **Credential-based access**.
319
321
320
322
:::image type="content"source="../media/disable-local-auth/update-existing-hub-credential-based-access.png" alt-text="Screenshot that shows selection of Credential-based access."lightbox="../media/disable-local-auth/update-existing-hub-credential-based-access.png":::
321
323
322
-
1. Select **Save** to save this choice.
324
+
1. Select **Save**.
323
325
324
326
# [Python SDK](#tab/python)
325
327
326
-
To configure the hub to use a shared key again, set`system_datastores_auth_mode = "accesskey"`for the hub. This code demonstrates an update of a hub named `test-ws1`:
328
+
To configure the hub to use a shared key again, set`system_datastores_auth_mode = "accesskey"`for the hub. This code updates a hub named `test-ws1`:
To configure the hub to once again use a shared key, use the `az ml workspace update` command and specify `--system-datastores-auth-mode accesskey`. This example demonstrates an update of a hub named `myhub`:
339
+
To configure the hub to use a shared key again, use the `az ml workspace update` command and specify `--system-datastores-auth-mode accesskey`. This example updates a hub named `myhub`:
338
340
339
341
```azurecli-interactive
340
342
az ml workspace update --name myhub --system-datastores-auth-mode accesskey
@@ -391,24 +393,24 @@ In the JSON template example, substitute your own values for the following place
391
393
392
394
For information on how to deploy an ARM template, see the following articles:
393
395
394
-
- [Tutorial: Deploy a local ARM template using Azure CLIor Azure PowerShell](/azure/azure-resource-manager/templates/deployment-tutorial-local-template)
395
-
- [Quickstart: Create and deploy ARM templates by using the Azure portal](/azure/azure-resource-manager/templates/quickstart-create-templates-use-the-portal)
396
+
- [Tutorial: Deploy a local ARM template using Azure CLIor Azure PowerShell](/azure/azure-resource-manager/templates/deployment-tutorial-local-template).
397
+
- [Quickstart: Create and deploy ARM templates by using the Azure portal](/azure/azure-resource-manager/templates/quickstart-create-templates-use-the-portal).
396
398
397
399
After you create the hub, identify all the users who will use it, such as data scientists. The users must be assigned the Storage Blob Data Contributor and Storage File Data Privileged Contributor roles in Azure RBACfor the storage account. If the users need only read access, use the Storage Blob Data Reader and Storage File Data Privileged Reader roles instead. For more information, see the [Role assignments](#scenarios-for-hub-storage-account-role-assignments) section.
398
400
399
401
---
400
402
401
-
After you revert the hub, update the storage account to enable shared-key access. For more information, see [Prevent shared-key authorization for an Azure Storage account](/azure/storage/common/shared-key-authorization-prevent).
403
+
After you revert the hub, update the storage account to enable sharedkey access. For more information, see [Prevent shared-key authorization for an Azure Storage account](/azure/storage/common/shared-key-authorization-prevent).
402
404
403
405
## Scenarios for hub storage account role assignments
404
406
405
-
To work with a storage account with disabled shared-key access, you might need to grant more roles to either your users or the managed identity for your hub. Hubs have a system-assigned managed identity by default. Some scenarios require a user-assigned managed identity. This table summarizes the scenarios that require extra role assignments.
407
+
To work with a storage account with disabled shared-key access, you need to grant more roles to either your users or the managed identity for your hub. Hubs have a system-assigned managed identity by default. Some scenarios require a user-assigned managed identity. This table summarizes the scenarios that require extra role assignments.
| Azure AI Speech | Storage Blob Data Contributor </br>Storage File Data Privileged Contributor ||
410
-
| Models as a service | System-assigned managed identity | Storage Blob Data Contributor | The hub's managed identity. </br>Automatically assigned the role when provisioned. </br>Don't manually change this role assignment. |
411
-
| Azure AI Search | System-assigned managed identity | Storage Blob Data Contributor | The hub's managed identity. </br>Automatically assigned the role when provisioned. </br>Don't manually change this role assignment. |
411
+
| Azure AI Speech |User's identity | Storage Blob Data Contributor </br>Storage File Data Privileged Contributor | |
412
+
| Models as a service | System-assigned managed identity | Storage Blob Data Contributor | The hub's managed identity. </br>Automatically assigned the role when you provision the hub. </br>Don't manually change this role assignment. |
413
+
| Azure AI Search | System-assigned managed identity | Storage Blob Data Contributor | The hub's managed identity. </br>Automatically assigned the role when you provision the hub. </br>Don't manually change this role assignment. |
412
414
| Fine-tuning of open-source software models | User-assigned managed identity | Storage Blob Data Contributor ||
413
415
| Prompt flow | User's identity | Storage Blob Data Contributor </br>Storage File Data Privileged Contributor | |
414
416
| Add and manage your own data | User's identity | Storage Blob Data Contributor | |
0 commit comments