DEV Community

Cover image for How to Store Secrets keys in Azure Key Vault
Ajayi Daniel
Ajayi Daniel

Posted on

How to Store Secrets keys in Azure Key Vault

What is Azure Key Vault
Azure Key Vault is a secure cloud service for storing and managing secrets, keys, and certificates so apps don’t expose sensitive data

Azure Key Vault is that safe deposit box where the following are been stored
Passwords
API keys
Database connection strings
Encryption certificates
Therefore Only the apps or people you authorize can open it.

The benefit of Azure KeyVault

Security: Protects secrets with strong encryption.
Access Control: You control who/what can access the vault (via Azure Active Directory).
Central Management: All secrets in one place, no need to hard-code them into apps.
Automation: Apps can retrieve secrets directly when running, instead of developers copying them around.

STEP BY STEP IN CREATING AZURE KEY VAULT

STEP 1 Select Create a resource GROUP

CLICK ON CREATE
Click on create

 click review & create

click on create

create

Step 2
In the Search services, search for and select Key Vault to find the Azure Key Vault service. The Key Vault pane appears.

You click on create
Keyvault

You impute all the necessary information
Image

Information

Purge
To enable purge if someone deletes a vault or object, Azure keeps it in a retention period (e.g., 90 days by default).

It cannot be purged during that period → you can recover it if deleted by mistake or by an attacKer

click on create
 important

Deployment complete

After validation passes, select Create to create the Azure Key Vault.

After the deployment is complete, select Go to resource. Your Key vault pane appears.
The name of the key is dairy
Dairy

Step 3 add a new secret to the vault.
In the left menu pane, under Objects, select Secrets. The Secrets pane appears for your key vault
In the top menu bar, select Generate/Import. The Create a secret pane appears.
key 2

Enter a name, value,
boom

You Must add role to be able to keep A Key secret

iway

Show the secrete key
verify that the secret value has been set
Select your secret from the list. The Versions pane appears for your secret.
Select the CURRENT VERSION of the secret. The Secret Version pane appears.
Select Show Secret Value to see the value assigned to the secret.

secrete

vbcbn

hidden

Top comments (0)