DEV Community

Funmibi Odeseye
Funmibi Odeseye

Posted on

How to deploy a Key Vault with Key, Secret and Certificate on Microsoft Azure

Azure Key Vault is a cloud service for securely storing and accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, or cryptographic keys. Key Vault service supports two types of containers: vaults and managed hardware security module(HSM) pools. Vaults support storing software and HSM-backed keys, secrets, and certificates. Managed HSM pools only support HSM-backed keys.

Image description

STEP 1
Create a Microsoft Azure account and login.

Image description

STEP 2
Search for 'Keyvaults' and click on it

Image description

STEP 3
Click on 'Create Key vault'

Image description

STEP 4
-Fill in the boxes. Choose your subscription.
-Create/choose a resource group[mine was the marchworkload].
-Type in a unique keyvault name
-Choose a region of your choice and the pricing tier.
-Soft delete: This feature allows you to recover or permanently delete a key vault and secrets for the duration of the retention period. It is automatically enabled in a key vault.
-Days to retain deleted vaults: helps you choose between 7-90 days to recover your vault if it gets deleted by chance.
-Purge protection: It enforces mandatory retention period and prevents the permanent deleting of key vaults prior to the retention period elapsing.
Click on 'Review and create'

Image description

STEP 5
Click on 'Create'

Image description

STEP 6
Click on 'Go to resource'

Image description

STEP 7
The Key Vault is active

Image description

STEP 8
To create Keys in Key Vault,
Search for 'Keys' and click on it

Image description

STEP 9
Click on 'Generate/Import'

Image description

STEP 10
-Choose a unique name
-Set an activation and expiration date
-You can choose to add a tag or not
Click on 'Create'

Image description

STEP 11
Key has been successfully created

Image description

STEP 12
To create Secrets in Key Vault,
Search for 'Secrets' and click on it,
Then click on 'Generate/Import'

Image description

STEP 13
-Choose a unique name
-Set an activation and expiration date
-You can choose to add a tag or not
Click on 'Create'

Image description

STEP 14
Secrets has been successfully created

Image description

STEP 15
To create Certificates in Key Vault,
Search for 'Certificates' and click on it,
Then click on 'Generate/Import'

Image description

STEP 16
-Method of Certificate Creation: Generate
-Create a unique name
-Subject - CN here stands for Common Name. Use any name of your choice but it must follow the required format. I used 'CN=myowncertificate.com'
-Fill the remaining boxes accordingly
Click on 'Create'

Image description

STEP 17
Certificates has been created.

Image description

Top comments (0)