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

An Azure Machine Learning workspace 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 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 workspace 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 Azure Previews.

Prerequisites

Not applicable.

Create a new workspace

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

  1. In Azure Machine Learning studio, select Create with customized networking, encryption identity, dependent resources or tags.

    Screenshot showing selection of the Create with customized networking, encryption identity, dependent resources or tags dropdown option.

  2. From the Basics tab, select the Storage account you created previously.

    Screenshot of workspace creation using the previously created storage account.

  3. From the Identity tab. In the Storage account access section, set Storage account access type to identity-based.

    Screenshot of workspace creation using identity-based storage access.

  4. Continue the workspace creation process as usual. As the workspace is created, the managed identity is automatically assigned the permissions it needs to access the storage account.

Update an existing workspace

If you have an existing Azure Machine Learning workspace, use the steps in this section to update the workspace to use Microsoft Entra ID, to authorize access to the storage account. Then, disable shared key access on the storage account.

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

Screenshot showing selection of Identity-based access.

Select Save to save this choice.

Assign roles to users

After updating the workspace, 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.

You must also identify all the users that need access to the default datastores - for example, Data Scientist. 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 workspace 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 reverting the workspace, 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.

Scenarios for 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
Managed online endpoint System-assigned managed identity Storage Blob Data Contributor Automatically assigned the role when provisioned.
Don't manually change this role assignment.
Monitoring (evaluating model quality/perf) User-assigned managed identity Storage Blob Data Contributor If an existing user-assigned managed identity is presently used by the workspace, verify that it has an assigned Storage Data Blob Contributor role.
The user-assigned managed identity is in addition to the system-assigned managed identity for your workspace. For information about how to add the managed identity to the workspace, visit Add a user-assigned managed identity.
Model Registry and ML Flow User-assigned managed identity Storage Blob Data Contributor Create compute cluster that uses the user-assigned identity.
• In case of model as input/output for a job, separately create an UAMI, add "Storage Data Contributor" role to underlying storage, and associate that UAMI when creating Compute Cluster. The job will then successfully run
• In case of registration of a model from local files, the user needs the "Storage Data Contributor" role for the underlying storage
• Model package scenarios have known issues and are not supported at this time.
Parallel Run Step (PRS) User-assigned managed identity Storage Table Data Contributor

Storage Queue Data Contributor
Data Labeling User's identity Storage Blob Data Contributor
Studio: create datasets, browse data User's identity Storage Blob Data Contributor
Compute Instance User's identity Storage File Data Privileged Contributor
Studio: notebooks User's identity Storage File Data Privileged Contributor
Studio: notebook's file explorer User's identity Storage File Data Privileged Contributor
PromptFlow User's identity Storage Blob Data Contributor
Storage File Data Privileged Contributor
Data: datastores and datasets User's identity Storage Blob Data Contributor

Limitations

  • Creating a compute instance with System-Assigned Managed Identity is NOT support for identity based workspace. If the workspace's storage account access type is identity-based access, compute instances currently doesn't support system assigned identity to mount data store, please use user assigned identity to create the compute instance, and make sure the user-assigned identity has Storage File Data Priviliiged Contributor on the storage account.