Cloud service · Azure · Updated

Azure Key Vault - Azure Key Vault is a managed service for storing secrets, managing cryptographic keys, and handling certificate lifecycles with identity-based access controls.

In short

Azure Key Vault centralizes application credentials, encryption keys, and TLS certificates so applications can access them without embedding sensitive values in source code or deployment files. Standard and Premium vaults support secrets, keys, and certificates, while the separate Managed HSM offering provides single-tenant, HSM-backed key management.

Cloud Services Hub →

9 key features of Azure Key Vault

01
Versioned secret storage

Store API credentials, passwords, connection strings, and other sensitive values as versioned objects. Give applications read access only to the secrets they need, and keep secret values out of source control, deployment outputs, and logs.

02
Remote cryptographic operations

Generate or import keys and invoke supported signing, verification, encryption, decryption, and key-wrapping operations through APIs. For bulk data, use envelope encryption: encrypt locally with a data key and protect that data key with a Key Vault key.

03
HSM-protected keys in Premium

Premium supports HSM-backed RSA, elliptic-curve, and symmetric oct-HSM keys using FIPS 140-3 Level 3 validated hardware. Symmetric keys support AES operations such as encryption, decryption, wrapping, and unwrapping without exporting key material.

04
Certificate lifecycle management

Import certificates or configure issuance and renewal through supported certificate authority integrations. Configure consuming services to retrieve renewed versions; storing or renewing a certificate does not automatically update every application that uses it.

05
Identity-based authorization

Authenticate with Microsoft Entra ID and authorize operations using Azure RBAC or vault access policies. Managed identities remove the need to provision a separate application credential for accessing the vault.

06
Network access restrictions

Use vault firewalls and Azure Private Link private endpoints to restrict data-plane connectivity. Private endpoint deployments require working DNS resolution and routing from applications, build agents, and administrative clients.

07
Rotation and expiration events

Configure key rotation policies and use Event Grid events to trigger lifecycle workflows. Secret rotation workflows must coordinate changes in both the external system and the stored secret, including consumer refresh and rollback.

08
Deletion protection and object recovery

Soft delete retains deleted vaults and objects for a configurable retention period, with a default of 90 days. Enable purge protection to prevent permanent deletion before that period expires, and back up individual objects when recovery requirements justify it.

09
Auditing and configuration governance

Send diagnostic logs to Azure Monitor Logs, Storage, or Event Hubs and alert on suspicious access or operational failures. Use Azure Policy to audit or enforce supported security settings and object requirements.

Where Azure Key Vault is used

  1. 01
    Remove credentials from application configuration

    Store third-party API credentials in a vault and let an application retrieve them using its managed identity. Prefer direct Microsoft Entra authentication instead of stored passwords when the destination service supports it.

  2. 02
    Control customer-managed encryption keys

    Provide encryption keys to compatible services such as Azure Storage and Azure SQL Database while controlling permissions, rotation, and deletion protection. Maintain access to older key versions for as long as dependent encrypted data requires them.

  3. 03
    Manage TLS certificates centrally

    Maintain certificates in a vault and connect supported consumers, such as Application Gateway, to retrieve them. Automate renewal and validate that the consuming service successfully adopts the renewed certificate.

  4. 04
    Protect application signing keys

    Use remote signing operations for application-generated signatures or compatible artifact-signing workflows without distributing private keys to application hosts or build agents. Select algorithms and key protection according to the verifier's requirements.

  5. 05
    Deliver secrets to Kubernetes workloads

    Use the Azure Key Vault provider for the Secrets Store CSI Driver to expose selected vault objects as files in AKS pods. Assign workload-specific identities and ensure applications reload changed values when rotation updates mounted content.

  6. 06
    Separate duties in regulated environments

    Give security administrators responsibility for key lifecycle and access policy while application identities receive only required cryptographic permissions. Use Premium HSM-backed keys or Managed HSM according to isolation requirements, and retain audit records in a separately governed logging destination.

How Azure Key Vault is priced

Standard vault consumption

Standard vault usage is primarily billed by metered operations, with rates determined by operation category and applicable pricing terms. Estimate reads, writes, cryptographic requests, and certificate-related charges using the current regional price sheet; caching can reduce repeated secret-read operations.

Premium vault consumption

Premium adds HSM-protected key capabilities, with applicable HSM key and operation charges depending on key type and usage. Model the required keys, versions, and cryptographic request volume rather than assuming Premium is only a fixed surcharge over Standard.

Managed HSM provisioned capacity

Managed HSM has separate pricing based on provisioned HSM pool capacity billed over time rather than the vault transaction model. Include its ongoing provisioned cost when comparing single-tenant key management with Premium vaults.

Supporting service charges

Private endpoints, diagnostic log ingestion and retention, Event Grid delivery, automation compute, and optional security monitoring can incur separate charges. Certificate authority fees may also apply independently of Key Vault.

Services Azure Key Vault works with

A common application architecture assigns each workload a managed identity and grants it narrowly scoped access to an application-specific vault. App Service can resolve Key Vault references in settings, while AKS can mount selected objects through the Secrets Store CSI Driver. Applications should cache values appropriately and handle refresh explicitly; a new secret version does not guarantee that every consumer immediately uses it. Use direct identity-based access to downstream services instead of storing credentials when supported.

For encryption at rest, services such as Azure Storage and Azure SQL Database access supported keys through their configured identities. These integrations make vault permissions, network reachability, deletion protection, and historical key retention part of the data service's availability design. Certificate consumers such as Application Gateway similarly require correctly configured identities, secret access, and renewal discovery.

Private endpoints provide a private connectivity path when paired with suitable routing and DNS. Event Grid and automation services can coordinate expiration notifications and rotation, while Azure Monitor collects access records and operational signals. Deploy identities, role assignments, network settings, diagnostics, and service references through infrastructure as code, but keep secret values out of templates, state exposure, and deployment logs.

App Service

App Service supports Key Vault references in application settings, allowing an application to consume a secret without implementing its own retrieval code. For example, configure a database password setting with a Key Vault reference and grant the web app's managed identity secret-read access. Allow for reference caching and refresh behavior, and configure outbound networking when the vault uses private endpoints.

Azure Kubernetes Service (AKS)

AKS integrates with Key Vault through the Azure Key Vault provider for the Secrets Store CSI Driver. For example, mount an external API token as a file in a pod using Microsoft Entra Workload ID and an identity authorized to read that secret. Configure rotation and application reload behavior; if synchronizing to Kubernetes Secrets, also protect those additional copies with Kubernetes RBAC and appropriate cluster security controls.

Azure Storage

Azure Storage can use a supported Key Vault key as a customer-managed key for encryption at rest. For example, assign the storage account's managed identity the required key permissions and configure the account to reference an RSA key in a protected vault. Verify the service's rotation behavior and retain required key versions, because disabling or deleting a required key can interrupt data access.

Azure SQL Database

Azure SQL Database supports customer-managed Transparent Data Encryption protectors stored in Key Vault. For example, grant the logical server's configured identity the required key permissions and select a supported vault key as the TDE protector. Preserve key availability and historical versions needed for backups and restores, and validate rotation procedures before production rollout.

Azure Application Gateway

Application Gateway v2 can retrieve supported TLS certificates from Key Vault using a user-assigned managed identity. For example, configure an HTTPS listener with a versionless Key Vault secret identifier so the gateway can discover renewed certificate versions through its refresh process. Grant access to the backing certificate secret and verify certificate format, exportability, and network connectivity for this certificate-retrieval integration.

Event Grid

Key Vault publishes supported lifecycle events for keys, secrets, and certificates to Event Grid. For example, route a secret-near-expiry event to an Azure Function that rotates an external credential and writes a new secret version. Make handlers idempotent, configure retries and dead-lettering, and monitor failures because event delivery does not itself perform rotation.

Azure Monitor

Key Vault diagnostic settings can send audit records to a Log Analytics workspace for querying and alerting. For example, create an alert for repeated authorization failures or unexpected secret deletion operations. Restrict access to the workspace and set retention according to investigation requirements and cost constraints.

API Management

Azure Key Vault supplies certificates and secret-backed named values to API Management through its managed identity. For example, a policy can use a backend API credential without storing the credential in policy XML.

Automation

Azure Key Vault holds customer-managed keys that Azure Automation can use to encrypt an Automation account's secure assets. The account's managed identity accesses the key, so key administration can stay separate from runbook administration.

Azure AI Bot Service

Azure Key Vault stores the customer-managed encryption key for an Azure Bot resource configured to use one. The bot resource's managed identity is granted access to the key.

Alternatives to Azure Key Vault in other clouds

AWS

AWS Certificate Manager (ACM)AWS Certificate Manager (ACM)

AWS Certificate Manager (ACM) and Azure Key Vault’s certificate management both centralize TLS certificate management and support imports and automated renewal. ACM deploys renewed Amazon-issued public certificates to integrated AWS services at no additional certificate cost, while Key Vault relies on configured consumers to retrieve renewed versions and charges for vault operations.

Compare fact by fact
Azure Key VaultAWS Certificate Manager (ACM)
Deployment after renewalConfigured consumers fetch renewalsACM deploys to integrated services
Certificate billingMetered vault ops; possible CA feesFree public certs on integrated AWS
Managed issuanceSupported CA integrationsAmazon-issued public certificates
AWS Key Management Service (AWS KMS)AWS Key Management Service (AWS KMS)

AWS KMS and Azure Key Vault both manage cryptographic keys for encryption and digital signing. Azure Key Vault also stores secrets and manages certificates; its Standard tier uses software-protected keys and Premium adds HSM-protected keys, while AWS KMS protects keys it creates with HSMs.

Compare fact by fact
Azure Key VaultAWS Key Management Service (AWS KMS)
What it managesKeys, secrets, and certificatesCryptographic keys
Key protectionStandard: software; Premium: HSM optionHSM-backed for KMS-created keys
Customer-managed key pricingPer operation; Premium HSM key fees$1/key/month plus request charges
AWS Secrets ManagerAWS Secrets Manager

AWS Secrets Manager and Azure Key Vault store application secrets for secure retrieval without hardcoding credentials. AWS Secrets Manager offers scheduled and on-demand secret rotation, while Azure Key Vault uses workflows that coordinate changes in the vault and the external system and also manages cryptographic keys and certificates.

Compare fact by fact
Azure Key VaultAWS Secrets Manager
Secret rotationWorkflow-managed rotationScheduled or on-demand automation
Secret storage billingMetered operations in StandardMonthly per secret plus API calls

What is Azure Key Vault

2 min read

Azure Key Vault provides three related capabilities: secret storage, cryptographic key management, and certificate management. Secrets include passwords, API tokens, and connection strings. Keys support operations such as signing, verification, encryption, decryption, and key wrapping, depending on the key type. Certificates combine certificate metadata and lifecycle management with associated key and secret objects. Treat these object types differently when designing access permissions: reading a secret returns its value, whereas using a cryptographic key does not require downloading its private key material.

Standard vaults support software-protected keys, secrets, and certificates. Premium vaults additionally support HSM-protected keys, including RSA-HSM, EC-HSM, and symmetric oct-HSM keys for supported AES operations. Premium HSMs use FIPS 140-3 Level 3 validated hardware. Azure Key Vault Managed HSM is a separate, single-tenant service for HSM-backed keys; it does not store application secrets or manage certificates as vault certificate objects. Select the deployment type according to required algorithms, isolation, service compatibility, and operational requirements.

Authenticate applications through Microsoft Entra ID, preferably using managed identities for Azure-hosted workloads or workload identity federation where supported. Use Azure role-based access control to grant the minimum required data-plane permissions. For example, an application that retrieves credentials can receive the Key Vault Secrets User role without permission to modify them. Management-plane access and data-plane access are distinct: permission to configure a vault does not automatically authorize reading its secrets under the RBAC permission model. Legacy vault access policies remain an alternative authorization model.

Separate vaults by application, environment, and security boundary rather than placing unrelated production and development credentials together. Restrict network access using firewalls or private endpoints, and configure private DNS and routing for every client network. Network access alone does not grant authorization, and a managed identity does not bypass network restrictions. Check each consuming service's network integration requirements before disabling public access.

Design applications around versioned objects and explicit rotation behavior. A versioned URI selects one object version, while a versionless reference permits consumers to resolve the current version according to their integration's refresh behavior. Key rotation policies can generate new key versions, but dependent services must support adopting them. Rotating a stored database password also requires changing the password at the database; updating Key Vault alone is insufficient. Certificate renewal likewise requires compatible issuer integration and a mechanism to deploy renewed certificates.

Cache secrets securely for an appropriate interval, reuse SDK clients, and apply exponential backoff for throttled or transient requests. Avoid making every application request depend on a fresh secret lookup. Enable diagnostic logging and alerts for access failures, unusual operations, and impending expiration. Use soft delete and purge protection, and test object recovery and any required backup procedures. Before disabling or deleting an encryption key, identify dependent services and migrate them, because loss of key access can make encrypted data unavailable.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.