Jimi
Posted on July 5, 2024
This blog post will guide you through creating secure shared storage for your application in Microsoft Azure. We'll cover storage account creation, access control with managed identities, and data encryption using Azure Key Vault.
Creating a Secure Storage Account
-
Search for "Storage Account" in Azure and create one with your desired name and resource group.
Enable Infrastructure Encryption for added security at rest.
Adding Managed Identity for Access Control
- Search for "Managed Identities" and create one within your resource group.
- Go to your storage account's Access Control (IAM) settings.
- Assign the Storage Blob Data Reader role to the managed identity you created.
Securing Storage with Key Vault and Key
Ensure you have Key Vault Administrator permissions. Assign this role to your user account.
Search for "Key Vaults" and create one with a name and resource group.
Enable Soft delete and Purge protection for additional security.
-
Generate a new key within the Key Vault.
Configuring Storage Account to Use Key Vault Key
- In your resource group's IAM settings, assign the Key Vault Crypto Service Encryption User role to your managed identity.
- Go to your storage account's Encryption settings and configure it to use the customer-managed key from your Key Vault.
- Select the managed identity you created to give it access to the key.
Setting Retention Policy and Encryption Scope
- Create a container named "hold" within your storage account.
- Upload a file to the container.
- Set a time-based retention policy on the container to prevent accidental deletion for a specified period (e.g., 5 days).
- Create an encryption scope within your storage account for additional infrastructure-level encryption.
Conclusion
By following these steps, you've created a secure shared storage solution in Azure. You've leveraged managed identities for access control, secured data with Azure Key Vault, and implemented retention policies and encryption scopes for enhanced protection. Remember to clean up your resources after following this guide in a non-production environment.
Posted on July 5, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.