Microsoft Azure

Azure Storage Access Keys

This tutorial will guide you through understanding and managing access keys for your Azure Storage accounts. Access keys are powerful credentials that grant full access to your storage account. It's crucial to manage them securely.

What are Azure Storage Access Keys?

Each Azure Storage account is provisioned with two 512-bit secret keys. These keys provide authenticated access to your storage account data and operations. You can regenerate these keys at any time, which invalidates the old keys.

Locating Your Access Keys

You can find your access keys within the Azure portal. Navigate to your storage account, then select 'Access keys' from the left-hand menu.

Here's a simplified representation of what you'll see:


Key Name:       key1
Key Value:      <your_primary_access_key>
Key Name:       key2
Key Value:      <your_secondary_access_key>
            

You will also see the connection strings, which embed these keys for easier integration with applications.

Security Best Practices

Due to the sensitive nature of access keys, it's vital to follow these best practices:

Important: Regenerating an access key invalidates the other key as well. If you regenerate key1, key2 will also be regenerated and the old values will become invalid. It's recommended to use the secondary key for a short period while updating your applications with the newly regenerated primary key.

Regenerating Access Keys

To regenerate your access keys, follow these steps in the Azure portal:

  1. Navigate to your storage account.
  2. In the left-hand menu, select Access keys.
  3. Select either Show keys to view them, or Regenerate key to generate new ones.
  4. Confirm the regeneration.

After regeneration, you will need to update any applications or services that use the old keys with the new ones.

Learn more about Azure Storage Security Explore Azure Key Vault