Other Articles

Key Vault – Ensure Vault Recoverable

This check ensures that Azure Key Vault is configured to be recoverable by enabling Soft Delete and Purge Protection to prevent accidental or malicious deletion of cryptographic keys, secrets, and certificates.

Check Details

  • Resource: Azure Key Vault
  • Check: Ensure Key Vault Is Recoverable
  • Risk: If Soft Delete and Purge Protection are not enabled, deleted vaults or objects (keys, secrets, certificates) may be permanently lost, leading to service disruption, compliance violations, and potential data loss.

Remediation via Azure Portal

  1. Log in to the Azure Portal. Azure Portal dashboard
  2. Navigate to Key Vaults and select the affected Key Vault. Azure Key Vault list
  3. In the left-hand menu, select Properties under Settings. Key Vault properties
  4. Ensure Soft delete is enabled.
  5. Ensure Purge protection is enabled. Key Vault soft delete and purge protection
  6. Click Save to apply the configuration if changes were made.

Remediation via Azure CLI

  1. Open Azure Cloud Shell or a local terminal with Azure CLI installed. Azure Cloud Shell
  2. Enable Purge Protection (Soft Delete is enabled by default for new vaults):

    az keyvault update \
     --name <key-vault-name> \
     --resource-group <resource-group> \
     --enable-purge-protection true
    
  3. Verify Soft Delete and Purge Protection status:

    az keyvault show \
     --name <key-vault-name> \
     --resource-group <resource-group> \
     --query "{softDeleteEnabled:properties.enableSoftDelete, purgeProtectionEnabled:properties.enablePurgeProtection}"
    

Replace <key-vault-name> and <resource-group> with your actual values.