Ensure that purge protection is enabled for Azure Key Vaults to prevent permanent deletion of key vault objects. Key vaults contain critical security objects including keys, secrets, and certificates. Deletion of a key vault can cause immediate data loss or loss of security functions such as authentication, validation, verification, and non-repudiation that are supported by the key vault objects. Purge protection ensures that even if a key vault is deleted, the key vault and its objects remain recoverable during the configurable retention period (minimum 7 days, maximum 90 days).
Purge protectionn prevents both accidental deletion by users and malicious deletion attempts from causing permanent data loss. Deleting or purging a key vault leads to immediate data loss, as keys encrypting data and secrets or certificates allowing access to services will become inaccessible. Enabling purge protection ensures that even if a key vault is deleted, the key vault and its objects remain recoverable during the configurable retention period. If no action is taken, the key vault and its objects will be purged once the retention period elapses. Purge protection provides a critical safety mechanism that prevents permanent deletion during the retention period, allowing organizations time to detect and recover from accidental or malicious deletion events. This is essential for maintaining business continuity, meeting regulatory compliance requirements, and protecting encrypted data across Azure services that depend on key vault objects for encryption, authentication, and access control.
As of February 2025, Microsoft enabled soft delete protection on all key vaults. Users can no longer opt out of or turn off soft delete. All key vaults automatically have soft delete enabled with a retention period that can be configured between 7 and 90 days (default is 90 days). Purge protection is an additional layer of protection that can be enabled on top of soft delete.
Once purge protection is enabled for a key vault, it cannot be disabled. This is a one-way operation designed to ensure maximum data protection. While purge protection prevents permanent deletion, it does not prevent the need to recreate access permissions after recovery.
Audit
To determine if purge protection is enabled for your Azure Key Vaults, perform the following operations:
Remediation / Resolution
To enable purge protection for your Azure Key Vaults, perform the following operations:
Important Note: Once purge protection is enabled for a key vault, it cannot be disabled. This is a permanent, one-way operation.References
- Azure Official Documentation
- Azure Key Vault recovery management with soft delete and purge protection
- Azure Key Vault: soft-delete overview
- Azure Key Vault: soft-delete overview
- GS-8: Define and implement backup and recovery strategy
- DP-8: Ensure security of key and certificate repository
- About Azure Key Vault
- Azure Command Line Interface (CLI) Documentation
- az account list
- az account set
- az resource list
- az resource show
- az resource update