When building a new application in today’s cloud-driven world, storage is no longer just about saving data — it’s about protecting it.
The company which designs and develops a new app, its utmost goal is clear: create a storage environment that is secure, controlled, and built with best practices from day one. Developers want storage access to happen only through secure access keys and managed identities. This eliminates risky, anonymous access and ensures that every request to the storage layer is traceable and authenticated.
Beyond authentication, the team plans to implement Role-Based Access Control (RBAC). In simple terms, this means giving the right people and services the right level of access — nothing more, nothing less. Developers get what they need to build, operations teams get what they need to manage, and no one has unnecessary permissions. This “least privilege” approach reduces security risks while improving governance and accountability.
To support testing and validation, the company also requires protected immutable storage. This ensures that critical test data cannot be altered or deleted — even accidentally. Whether it’s for compliance validation, audit preparation, or resilience testing, immutability adds an extra layer of confidence that data integrity is preserved.
This isn’t just about infrastructure. It’s about building a secure-by-design application architecture — one that prioritizes identity, governance, and data protection from the very beginning.
Because in today’s cloud environment, security is not an add-on. It’s the foundation.
Here in this article, I have clearly highlighted and anotated this with the series of screenshots to facilitate the ease of understanding these step-by-step guides you need to follow to achieve this as a young cloud engineer who is trying to understand the basis of cloud infrastructure e.g. storage and many more.
Create the storage account and managed identity
- Provide a storage account for the web app.
For Resource group select Create new. Give your resource group a name and select OK to save your changes.

Notice the warning, This option cannot be changed after this storage account is created.

- Provide a managed identity for the web app to use.
2. Assign the correct permissions to the managed identity. The identity only needs to read and list containers and blobs.
In the Job functions roles page, search for and select the Storage Blob Data Reader role.

Select Select members, in the Managed identity drop-down select User-assigned managed identity

Select the managed identity you created in the previous step.

Select Review + assign a second time to add the role assignment.

Your storage account can now be accessed by a managed identity with the Storage Data Blob Reader permissions. With this type of permission, you can only access the contents of your storage but but you wont be able to change or edit the contents.

Secure access to the storage account with a key vault and key
- To create the key vault and key needed for this part of the lab, your user account must have Key Vault Administrator permissions
Select your resource group, and then the Access Control (IAM) blade.

On the Job functions roles page, search for and select the Key Vault Administrator role.

On the Members page, select User, group, or service principal.

Search for and select your user account. Your user account is shown in the top right of the portal.

Select Review + assign a second time to add the role assignment.

2. Create a key vault to store the access keys.
Provide the name for the key vault. The name must be unique.

Ensure on the Access configuration tab that Azure role-based access control (recommended) is selected.

Wait for the validation checks to complete and then select Create.

On the Overview blade ensure both Soft-delete and Purge protection are enabled.

3. Create a customer-managed key in the key vault.
In your key vault, in the Objects section, select the Keys blade.

Take the defaults for the rest of the parameters, and Create the key.

Configure the storage account to use the customer managed key in the key vault
- Before you can complete the next steps, you must assign the Key Vault Crypto Service Encryption User role to the managed identity.
Select your resource group, and then the Access Control (IAM) blade.

On the Job functions roles page, search for and select the Key Vault Crypto Service Encryption User role.

Select select members, in the Managed identity drop-down select User-assigned managed identity.

2. Configure the storage account to use the customer managed key in your key vault.
In the Security + networking section, select the Encryption blade.

If you receive an error that your identity does not have the correct permissions, wait a minute and try again.

Configure an time-based retention policy and an encryption scope.
- The developers require a storage container where files can’t be modified, even by the administrator.
Create a container called hold. Take the defaults. Be sure to Create the container.

Verify you are notified failed to delete blobs due to policy.































































Top comments (0)