DEV Community

Cover image for PROVIDE STORAGE FOR A NEW COMPANY APP
     Faith Aneke Ada
Faith Aneke Ada

Posted on

PROVIDE STORAGE FOR A NEW COMPANY APP

INTRODUCTION

Providing secure and scalable storage for a new company application is a foundational step in cloud architecture. A properly configured Azure Storage account ensures high availability, data protection, controlled access, and compliance with security best practices. In this exercise, we deploy and configure storage resources that support the application while maintaining strong security and governance standards.

IMPLEMENTATION STEPS

1.Create the Storage Account with Infrastructure Encryption

🎯 Objective:

Provision a secure storage account for a web application with infrastructure-level encryption enabled.

πŸ› οΈ Steps:

1i.Go to Storage accounts

Storage account

1ii.β†’click on + Create.

+ create

2.Create a new Resource group.

Create new RG

3.Provide a globally unique Storage account name.

storage name

4.Navigate to the Encryption
5.Enable Infrastructure encryption (note: this cannot be changed after creation).
6.Select Review + Create β†’ Create.

encryption

7.After deployment, select Go to resource.

Go to resource

2.Create and Configure a Managed Identity

2a.Create a User-Assigned Managed Identity

🎯 Objective:

Provide secure, passwordless authentication for the web app.

πŸ› οΈ Steps:

1i.Search for Managed identities

Managed Identities

1ii. β†’ Click +Create.

+ create

2.Select your resource group.

Resource group

3.Provide a name for the manage identity.

unique MI name

4.Select Review + Create β†’ Create.

Review and Create

2b.Assign Storage Permissions to the Managed Identity

🎯 Objective:

Grant the identity read-only access to blobs and containers.

πŸ› οΈ Steps:

1.Open the Storage account.

Storage account

2.Go to Access Control (IAM).
3.Select Add role assignment.
Add role

4.Choose the role Storage Blob Data Reader.

choose a role

5.Under Members, select Managed identity.

Select Managed identity

6.Choose User-assigned managed identity.
7.Select your managed identity.

Choose user assigned MI

8.Click Review + assign.
Review +assign

βœ… Result:

The managed identity can securely read and list blobs without using storage keys.

3.Secure Access with Key Vault and Customer-Managed Key

3a.Assign Key Vault Administrator Role

🎯 Objective:

Grant your user account permissions to manage keys.

πŸ› οΈ Steps:

1i.Go to Resource group
Resource Group

1ii. Navigate to β†’ Access Control (IAM).
2.Select Add role assignment.

3.Assign the Key Vault Administrator role to your user account.

Keyvault Administrator role

4.Select Review + assign.

Review + assign

3b.Create a Key Vault

🎯 Objective:

Store encryption keys securely.

πŸ› οΈ Steps:

1i.Search for Key vaults.

Key vaults

1ii. Select β†’ + Create.

+ Create

2.Select your resource group.

Resource group

3.Provide a globally unique name.
4.Ensure Azure role-based access control is selected.
5.Select Review + Create β†’ Create.

unique name and review+create

6.After deployment, verify Soft-delete and Purge protection are enabled.

create + review

3c.Create a Customer-Managed Key

🎯 Objective:

Generate a key to control storage encryption.

πŸ› οΈ Steps:

1.In the key vault, select Keys β†’ Generate/Import.

Generate/import keys

2.Provide a name.
3.Accept defaults.
4.Select Create.

create key vault

4.Configure Storage Account to Use Customer-Managed Key

4a.Assign Crypto Role to Managed Identity

🎯 Objective:

Allow the managed identity to access the encryption key.

πŸ› οΈ Steps:

1i.Go to Resource group.

Resource group

1ii. Select β†’ Access Control (IAM).
2.Select Add role assignment.

3.Choose Key Vault Crypto Service Encryption User.

Give a role

4.Select Managed identity β†’ User-assigned.
5.Choose your managed identity.

select members

6.Select Review + assign.

Review + assign

4b. Enable Customer-Managed Keys on Storage Account

🎯 Objective:

Configure storage to use the Key Vault key for encryption.

πŸ› οΈ Steps:

1.Open the Storage account.

Storage account

2.Navigate to Security + networking β†’ Encryption.
Encryption

3.Select Customer-managed keys.
customer managed keys

4.Choose your Key vault and key.
Key and key vault

5.Set Identity type to User-assigned.
6.Select your managed identity.
7.Click Save.
Identity

βœ… Result:

The storage account now uses a customer-managed key stored in Azure Key Vault.

5.Configure Time-Based Retention Policy (Immutable Storage)

🎯 Objective:

Prevent modification or deletion of files for a fixed retention period.

πŸ› οΈ Steps:

1.Go to Storage account β†’ Containers.

containers

2.Create a container named hold.
name container

3.Upload a file.
upload file

4.Go to Settings β†’ Access policy
5.Under Immutable blob storage, select + Add policy.
6.Select Time-based retention
7.Set retention period to 5 days.
8.Save changes.
Add policy

9.Attempt to delete the file.
10.Confirm deletion fails due to policy.
confirm deletion

βœ… Result:

Files cannot be modified or deleted until the retention period expires.

6. Configure an Encryption Scope

🎯 Objective:

Create an encryption scope with infrastructure encryption enabled.

πŸ› οΈ Steps:

1.Go to Storage account β†’ Security + networking β†’ Encryption.
2.Select the Encryption scopes tab.
3.Click Add.
 encryption tab

4.Provide a name.
5.Set:
β€’Encryption type: Microsoft-managed key
β€’Infrastructure encryption: Enable
6.Create the encryption scope.
create Encryption scope

7.Create a new container.
new container

8.Under Advanced, select the encryption scope.

encryption scope
9.Apply it to all blobs in the container.

apply scope to all blogs

βœ… Result:

Blobs within the container are encrypted using the defined encryption scope with infrastructure encryption enabled.

πŸ’‘ Key Outcomes

βœ… Storage account secured with infrastructure encryption.
βœ… Managed identity configured for secure authentication.
βœ… Customer-managed encryption key stored in Azure Key Vault.
βœ… Immutable storage enforced with time-based retention.
βœ… Encryption scope created for granular encryption control.

Top comments (1)

Collapse
 
realcloudprojects profile image
SKILL.SCH

welldone