If the 'AllowSharedKeyAccess' property is disabled for a storage account, will that still require the access keys to be rotated periodically?

Sarish Sayyed (INFOSYS LIMITED) 20 Reputation points Microsoft Vendor
2024-04-19T17:35:59.27+00:00

So we have multiple storage accounts and we are currently switching our apps from access keys to managed identity for storage account authorization.

I need to understand if even after making this switch and setting the 'AllowSharedKeyAccess' property as disabled, do we still need to rotate the access keys on a periodic basis?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,709 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nehruji R 1,976 Reputation points Microsoft Vendor
    2024-04-22T05:36:12.54+00:00

    Hello Sarish Sayyed (INFOSYS LIMITED),

    Greetings! Welcome to Microsoft Q&A Platform.

    When you create a storage account, Azure generates two 512-bit storage account access keys for that account. These keys can be used to authorize access to data in your storage account via Shared Key authorization, or via SAS tokens that are signed with the shared key.

    Microsoft recommends that you use Azure Key Vault to manage your access keys, and that you regularly rotate and regenerate your keys. Using Azure Key Vault makes it easy to rotate your keys without interruption to your applications.

    Even with managed identity, it’s still a good idea to periodically rotate and regenerate your keys. This helps mitigate the risk of compromised keys.To prevent users from accessing data in your storage account with Shared Key, you can disallow Shared Key authorization for the storage account. Granular access to data with least privileges necessary is recommended as a security best practice.

    To rotate keys using a user-managed identity, assign the “Storage Account Key Operator” role to the managed identity. This role allows the identity to list and regenerate keys on the selected storage account and follow the least privilege model when assigning roles.

    In summary, while managed identity improves security, regular key rotation remains a best practice to enhance overall security and reduce risks associated with compromised keys.

    refer - https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#next-steps for detailed guidance.

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more