Azure Key Vault is a cloud service for securely storing and accessing secrets. A secret is anything that you would like to tightly control access to, such as API keys, passwords, certificates, or cryptographic keys.

What is Azure Key Vault?

Azure Key Vault enables you to:

  • Safeguard secrets: Protect API keys, passwords, certificates, and other secrets.
  • Manage cryptographic keys: Create and manage the cryptographic keys used to encrypt your data.
  • Control access: Define granular access policies to control who or what can access your secrets and keys.
  • Centralize management: Store and manage all your secrets and keys in one secure location.
  • Audit access: Monitor and audit access to your secrets and keys for security and compliance.
Key Benefit: By using Key Vault, you eliminate the need to store sensitive information in your code or configuration files, which significantly reduces the risk of accidental exposure.

Key Vault Components

Azure Key Vault consists of the following main components:

  • Vaults: The primary resource in Key Vault, used to store and manage secrets, keys, and certificates.
  • Secrets: Any piece of information that is accessed using a string, such as passwords, API keys, or connection strings.
  • Keys: Cryptographic keys used for encryption and decryption operations. Key Vault supports two types of keys:
    • Software-backed keys
    • HSM-backed keys (Hardware Security Module)
  • Certificates: TLS/SSL certificates that can be managed and deployed by Key Vault.

Use Cases

Azure Key Vault is essential for various applications and services, including:

  • Securing connection strings for databases and storage accounts.
  • Managing API keys for third-party services.
  • Storing credentials for authentication and authorization.
  • Protecting private keys for TLS/SSL certificates.
  • Encrypting data at rest using symmetric or asymmetric keys.

Example: Storing a Secret

Using Azure CLI to add a secret:

az keyvault secret set --vault-name MyKeyVault --name MyAppPassword --value "MySecurePassword123"

Security and Compliance

Key Vault is designed with security and compliance in mind. It integrates with Azure Active Directory for identity and access management, and all data stored within Key Vault is encrypted at rest and in transit.

For more detailed information, explore the following sections: