DEV Community

Cover image for How to Implement Key Vault in Azure
Yemisi Oyesainu
Yemisi Oyesainu

Posted on

How to Implement Key Vault in Azure

Azure Key Vault is an Azure service that falls under the category of key management solutions. It is used to securely store application secrets in a centralised cloud location so that access permissions and access logging can be controlled.

It is very useful for the followings:
(1) To manage storage and access to secrets such as tokens, passwords, certificates, API keys, and other secrets
(2) It makes creating and controlling the encryption keys used to encrypt your data easy
(3) It facilitates certificate management
(4) It's used to store secrets that are backed by hardware security modules (HSMs)

Let me quickly take you through how to implement this valuable cloud based security service in Azure

1st Step - Create a Key Vault
Log in to Azure portal and search for Azure Key Vault

Image description

Image description

Click on it

Image description
Then Click on Create

Image description
Complete the Project Details and the Instance details
Select your subscription. I will use Azure Pass Sponsorship
I will use the Resource group MayWorkload1
Then under Instance details, you can give any random name to your key vault that you want to create. I will name this one dovault1

Image description

Image description

Soft-delete is enabled. This feature allows recovery of the deleted vaults and deleted key vault objects like secret, key, and certificate. It will remain recoverable for a configurable period of 7 to 90 calendar days. Its at default of 90days in the image above
Enable purge protection

Then click on Review and Create

Image description

Click on create and wait for the deployment to be complete

Image description
The Key Vault dovault1 has been created

2nd Step - Create a Key
Go to Resource and Click on Keys

Image description

Click on Generate/Import

Image description

Give the key any name of your choice.I will name this key dokey1
Leave the creating option at Generate
Leave key type and RSA key size at default
Set the Activation and Expiry dates

Image description

Then click on Create

Image description

dokey1 has been created

Image description

3rd Step - Create a Secret
Go back to the Key vault and click on Secrets

Image description

Give the secret a name of your choice. I will name this one dosecret1
Then leave other parameters at default and set the activation and expiry date

Image description

Click on Create

Image description

Image description

Just as simple as that. We have created a Key Vault and we have created a key and a secret in it.

This is helpful? Kindly give a comment.

Top comments (1)

Collapse
 
godwink profile image
Konkwo Godwin

Great