DEV Community

Cover image for How to create a storage with access to only those with specific keys and identities
Clinton Mbilitem
Clinton Mbilitem

Posted on

How to create a storage with access to only those with specific keys and identities

hello everyone! today we will be looking at How to create a storage with access to only those with specific keys and identities in a situation we're a company wants to build an app

first we create a storage account as always

storage

  • click encryption

click encryption

  • select enable encryption
    select enable encryption

  • go to resource

go to resource

  • Search for and select Managed identities

manage identity

  • select your resource group, give your identy a name and then review and create.

group

create

my

  • select access control, Add role assignment

select access control

  • On the Job functions roles page, search for and select the Storage Blob Data Reader role
    select

  • On the Members page, select Managed identity.
    Select Select members, in the Managed identity drop-down select User-assigned managed identity.
    Select the managed identity you created in the previous step.
    Click Select

okay

create

  • final create finale create

** now to restrict access to only those with vault keys**

  • select your resource group

alright

-select access control, Add role assignment

select access control,  Add role assignment

  • On the Job functions roles page, search for and select the Key Vault Administrator role
    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.
    Select Select members.
    Search for and select your user account. Your user account is shown in the top right of the portal.
    Click Select

select memberes

  • create
    create

  • search key vault

search key vault

ok

  • name your vault

name your vault

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

  • create

create

go to resource

  • enable both

enable both

  • enable purge
    enable purge

  • objects, keys

objects, keys

  • create key in vault key create key in vault key

Configure the storage account to use the customer managed key in the key vault

  • select resource

select resource

  • access control
    access control

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

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 select your user

create

Configure the storage account to use the customer managed key in your key vault

  • select your storage account

select your storage account

  • selecting keys
    selecting keys

  • Select Customer-managed keys.
    Select a key vault and key. Select your key vault and key.
    Select to confirm your choices.

Select Customer-managed keys.<br>
Select a key vault and key. Select your key vault and key.<br>
Select to confirm your choices.

  • identity type
    identity type

  • select your identity
    select your identity

Configure an time-based retention policy and an encryption scope
if The developers require a storage container where files can’t be modified, even by the administrator

  • select your account

select your account

  • select container select container

-give container name
give container name

  • uplaod a file to container

uplaod a file to container

  • put retention time to 5days

put retention time to 5days

  • Try to delete the file in the container. Verify you are notified failed to delete blobs due to policy.

try to delete

  • confirm delete error message

confirm delete error message

if the developers require an encryption scope that enables infrastructure encryption

  • your storage account

your storage account

  • select encryption in network

select encryption in network

  • create new conatainer and apply your encryption

create new conatainer and apply your encryption

Top comments (1)

Collapse
 
realcloudprojects profile image
SKILL.SCH

Welldone!