HOW TO CREATE KEY VAULT IN AZURE AND STORE SECRET PASSWORD WITHIN THE KEY VAULT
Published: 2023-04-26 11:47:53

Many services and applications use certificates and other secrets for authentication, data connections, encryption, and so on.
For example, imagine your organization has created a custom service that needs to communicate securely across your 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 you 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, you gain the capability to easily monitor and audit access and also gain the capability to easily use those secrets among many Azure services.

Below are the steps to take in creating Key vault in Azure and how to store secret password within it.

Go to portal.azure.com and login to your azure account
Then click on the search bar and type key vault
Click on create 

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

After clicking on create, the page will displace where you will fill all the necessary information and click on review and create as shown in the image below

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

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

A review page will displace, then click on create to deploy. See the image below

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

Wait for deployment, after deployment then click on Resource as shown in the image below

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

And then you have your key vault created. see the image below

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

The next step is to add a secret to the key vault and this can be done by clicking on Secret at right side of your key vault page and you have this

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

Next is to click on Generate/import and fill the information as shown below

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

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

Fill in the necessary information as in seen above and put your secret value that you want to keep in the azure key vault then click on create. At this stage, you have added your secret password.
Note: The password you put in your secret value is the secret password your stored.

See the image you will get below after clicking on create

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

You have successfully add a secret to your Key vault.

Thank you for reading and I hope you find this useful.