Edit

Share via


Disable shared key access for your hub's storage account (preview)

Note

The information provided in this article is specific to a hub-based project, and doesn't apply for a Foundry project. For more information, see Types of projects.

An Azure AI Foundry 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.

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 the Azure Machine Learning studio, or to run a notebook while authenticated with the user's identity. The Azure Machine Learning service uses a managed identity to access the storage account - for example, when running a training job as the managed identity.

Use of your hub with a shared key disabled storage account is currently in preview.

Important

This feature is currently in public preview. This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities.

For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

Prerequisites

Not applicable.

Create a new hub

When you create a new hub, the creation process can automatically disable shared key access. You can also create an Azure Storage account, disable shared key access, and use it during hub creation.

  1. From the Azure portal, search for Azure AI Foundry. From the left menu, select AI Hubs, and then select + Create and Hub.

    Screenshot of the Azure AI Foundry portal.

  2. From the Basics tab, enter the hub details and then select the Storage tab. Select the Azure Storage account that you previously created.

    Screenshot of hub creation using the previously created storage account.

  3. From the Identity tab, set the Storage account access type to identity-based and then enable the Disable shared key access option.

    Screenshot of hub creation using identity-based storage access.

  4. 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.

Update an existing hub

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.

  1. Go to the Azure portal and select the Azure AI Foundry hub.

  2. From the left menu, select Properties. From the bottom of the page, set Storage account access type to Identity-based. Select Save from the top of the page to save the configuration.

    Screenshot showing selection of Identity-based access.

Assign roles to users

After you update the hub, update the storage account to disable shared key access. For more information about disabling shared key access, visit the Prevent shared key authorization for an Azure Storage account article resource.

You must also identify all the users that need access to the default datastores - for example, Data Scientists. These users must be assigned the Storage Blob Data Contributor and Storage File Data Privileged Contributor roles in Azure role-based access control for the storage account. If these users only need read access, use the Storage Blob Data Reader and Storage File Data Privileged Reader roles instead. For more information, visit the role assignments resource in this document.

Revert to use shared keys

To revert a hub back to use of shared keys to access the storage account, use this information:

To update an existing workspace, go to Properties and select Credential-based access.

Screenshot showing selection of Credential-based access.

Select Save to save this choice.

After you revert the hub, update the storage account to enable shared key access. For more information, visit the Prevent shared key authorization for an Azure Storage account article.

Scenarios for hub storage account role assignments

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. However, some scenarios require a user-assigned managed identity. This table summarizes the scenarios that require extra role assignments:

Scenario Microsoft Entra ID Required roles Notes
AI Speech Storage Blob Data Contributor
Storage File Data Privileged Contributor
Model-as-a-Service system-assigned managed identity Storage Blob Data Contributor The hub's managed identity.
Automatically assigned the role when provisioned.
Don't manually change this role assignment.
Azure Search system-assigned managed identity Storage Blob Data Contributor The hub's managed identity.
Automatically assigned the role when provisioned.
Don't manually change this role assignment.
Fine tuning of OSS models User-assigned managed identity Storage Blob Data Contributor
PromptFlow User's identity Storage Blob Data Contributor
Storage File Data Privileged Contributor
Add and manage your own data User's identity Storage Blob Data Contributor