DEV Community

tomia456
tomia456

Posted on

How to create a Key Vault and add Key, Secret and Certificate in Microsoft Azure

Azure Key Vault is a cloud service that securely stores and manages application secrets in a centralized cloud location where it is safeguarded by industry-standard algorithms and hardware security modules in order to control access, permission and login.
The key vault securely keep sensitive information like keys, secrets, certificates, passwords etc.
Azure key vaults are created and managed through the Azure portal.
In this Quick Start, we will concentrate on creating a Key Vault, then add Key, Secret and Certificate to it.

Step 1

Go to search bar, Click and Search for KEY VAULT

Image description

Step 2

Click on 'Create key vault'

Image description

Step 3

Subscription -Choose your prefer Subscription

Resource group -Create or Select a resource group[mine was the MarchworkFlow]

Key vault name - Choose a unique name

Region - East us

Pricing tier - Standard

Soft delete - Is always automatically enabled, to enable user to recover permanently delete a key vault and secrets durimg the retention period. .

Days to retain deleted vaults - The retention period is 7 to 90 days. This means if you purposefully or mistakenly delete a key vault, you can recover it within 7 - 90 days, depending on the

Purge protection - It enforces mandatory retention period and prevents the permanent deleting of key vaults prior to the retention period select and click enable purge protection.

Image description

Step 4

Select and Click 'Review + Create'

Image description

Step 5
Select and Click 'Create'

Image description

Step 6
Select and Click 'Go to resource'

Image description

Step 7
Key Vault is created and ready to use

Image description

Step 8

CLick and select key on the right hand side as indicated in the diagram below

Image description

Step 9
Select and Click 'Generate/Import'

Image description

Step 10

Name - Choose a unique name

key type - left as RSA

RSA key size - 2048

  • Enable 'Set activation date' and 'Set expiration date' to your preference Enabled - Yes

Tags - This is optional you can use to create tags or not
Click on 'Tags' to choose a Tag Name and Tag Value for the project. E.g Tag Name - Windows and Tag Value - Hp

Image description

Step 11
Select and Click 'Create'

Image description

Step 12
Congratulations you`ve successfully created a Key

Image description

Step 13

Now to create Secrets **in key vault
Click on '
Secrets**'

Image description

Step 14
Select and Click 'Generate/Import'

Image description

Step 15

**Name **Create a unique name

'Set activation date' and 'Set expiration date' to your preference

Enabled - Yes

Click on 'Create'

Image description

Step 16

Congratulations you`ve successfully created a Secret

Image description

Finally to create Certificatein key vault
Click on 'Certificate'

Image description

Step 18
Select and Click 'Generate/Import'

Image description

Step 19

Method of Certificate Creation - You can either Generate one or Import an existing certificate

Certificate Name - Create a unique name for your Certificate

Type - Should be left at defualt ( self-Signed Certificate)

Subject - Subject would be a unique Domain to access your certificate and must be written this way "CN=tommysCerti12c3.com"

Validity Period - adjust to your peference

Content Type - leave at default

*Lifetime Action Type *- Automatic renew at the given percentage lifetime

Percentage lifetime - adjust to your perference

Image description

Step 20
Select and Click 'Create'

Image description

Step 21
Congratulations!!
on completing creating the 3 Main Components of Creating a key Fault
which are the** key , Secret , Certificate
**

NOTE: Make sure to always delete Azure Resource when they are not in use

Enjoy!!!!!

Top comments (0)