HOW TO CREATE KEY VAULT IN AZURE AND STORE SECRET PASSWORD WITHIN THE KEY VAULT
Tags: q3upp
Published: 2023-05-06 04:06:06


Several services and applications use certificates and other secrets for authentication, encryption, data connections etc
For instance, assuming an organization has created a custom service that needs to communicate securely across its environment with other services. It would likely do so using credentials.
Hard-coding credentials in an application puts those credentials at risk for compromise and makes key management difficult at best.

Azure Key Vault enables one to securely store secrets such as tokens, passwords, certificates, cryptographic keys, and API keys.
Using the previous example, instead of storing the credentials in your custom application, you would store the credentials in Azure Key Vault. The application would call Key Vault whenever it needed to use the credentials.

Azure Key Vault also provides a centralized, cloud-based service for creating, storing, and managing keys and certificates. By storing secrets in Key Vault, one gains the capability to easily monitor and audit access and also gain the capability to easily use those secrets among many Azure services.
Steps to take in creating Key vault in Azure and how to store secret password within it are outlined below:

Login to your azure account via portal.azure.com  
Go to search bar and search for  key vault
Click on create

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jz35wce4fwkwkj2tblvk.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6rk5ftlwgqf89lbshpw.png)
On clicking **Create**, the wizard page will displace then all the necessary information will be filled and click on **Review + Create** as shown in the image below:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o194u5k2qcrvz4eoc29y.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/icve7hp5bgq2mpr2edp2.png)
Then click on create to deploy the resource 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x05z9uov8t1r30dp5tbj.png)
Wait for deployment to complete , after successful deployment then click on **GO to Resource** as shown in the image below

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oz8tk4pq6d2c4rhgazmt.png)
Key vault created. The next step is to add a secret to the key vault which can be done by clicking on secret at right side of the key vault page

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9sb7qovrzny9lyzjidw.png)
Next click on Generate/import and fill the information as shown below

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdvijufuazdkrzadpvgm.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8y44lmg60ii2bhads9c0.png)
After filling in the necessary information as seen above and put the secret value that you want to keep in the azure key vault then click on **create**. At this stage, secret password is added.
Note: This password  put in your secret value is actually the secret password you stored.

The image you will get below after clicking on **create**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oflih2fok60j4jrcibu3.png)
The version of the secret is shown below: 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2nn1pur69gixzqg22k18.png)
Secret value highlighted be below: 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0frjseahfaj2dmt9dug3.png)
Successfully a secret has been added  to the Key vault.