You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Azure Key Vault is a cloud service for securely storing and managing sensitive information — secrets, encryption keys, and certificates. It centralises secret management, reduces the risk of accidental exposure, and integrates deeply with other Azure services and Entra ID.
Storing sensitive data in application code, configuration files, or environment variables creates multiple risks:
Key Vault solves all of these problems:
| Benefit | Description |
|---|---|
| Centralised storage | All secrets, keys, and certificates in one secure location |
| Access control | Entra ID authentication and RBAC or access policies |
| Audit logging | Every access is logged and can be monitored |
| Automatic rotation | Integration with services that support auto-rotation |
| Hardware protection | HSM-backed keys for the highest level of security |
A secret is any arbitrary string value — connection strings, API keys, passwords, tokens.
# Create a secret
az keyvault secret set --vault-name myKeyVault --name "DatabasePassword" --value "S3cur3P@ssw0rd!"
# Retrieve a secret
az keyvault secret show --vault-name myKeyVault --name "DatabasePassword" --query value -o tsv
Cryptographic keys used for encryption, decryption, signing, and verification. Key Vault supports:
| Key Type | Description |
|---|---|
| RSA | Asymmetric keys (2048, 3072, 4096 bits) |
| EC | Elliptic curve keys (P-256, P-384, P-521) |
| Symmetric | AES keys (managed HSM only) |
Keys can be software-protected or HSM-protected (using FIPS 140-2 Level 2 or Level 3 validated hardware).
# Create an RSA key
az keyvault key create --vault-name myKeyVault --name "EncryptionKey" --kty RSA --size 2048
Key Vault can manage the full lifecycle of TLS/SSL certificates:
# Create a self-signed certificate
az keyvault certificate create --vault-name myKeyVault --name "MyCert" \
--policy "$(az keyvault certificate get-default-policy)"
Key Vault supports two access models:
Uses standard Azure RBAC roles to control access:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.