DR implementation: Key Vault
Tier: T0. Key Vault holds the secrets and certificates that every flow needs at startup, including the platform wildcard certificate that Application Gateway uses. Losing a secret can stop a T0 flow as completely as losing a database.
Current configuration (prd)
| Setting | Value |
|---|---|
| Vaults | About 55 |
| Zone resilience | Microsoft-managed. Key Vault replicates inside the region with no ION configuration |
| Soft delete | On for every vault. Retention is 7 days on most vaults and 14 days on kv-doc-prd. Not reported on kv-socra-prd-chn-01 |
| Purge protection | On for every vault except kv-den-prd-chn-01 |
| Secret versions | Kept by Key Vault. Earlier versions can be re-enabled |
Failure scenarios
| Scenario | Behaviour | Recovery | RTO and RPO |
|---|---|---|---|
| Zone loss | No effect | Microsoft-managed | Not applicable |
| Secret deleted | Apps that load it at startup fail on their next restart. Key Vault references in app settings stop resolving | Recover the secret from soft delete | Minutes. RPO 0 |
| Secret overwritten with a bad value | Authentication to the dependency fails | Re-enable the previous version, or set it as current again | Minutes. RPO 0 |
| Vault deleted | Every secret and certificate in it is unavailable | Recover the vault from soft delete, using the same name | Minutes. RPO 0 |
| Secret purged, on a vault without purge protection | Permanent loss | Re-issue the secret at the source system and store it again | Depends on the source system. This is why DR-13 is MEDIUM |
| Wildcard certificate missing | TLS fails on the Application Gateway listeners | Recover the certificate from soft delete. Application Gateway picks it up on its next poll | Minutes, plus the poll interval |
| Secret leaked during an incident | Security exposure | Rotate the secret | Depends on the source system |
Recovery procedures
Recover a deleted vault
Owner: CPE
List the deleted vaults with az keyvault list-deleted. Recover the vault with
az keyvault recover --name <vault>. The access policies or RBAC role
assignments on the vault come back with it. Confirm with a Terraform plan.
Recover a deleted secret or certificate
Owner: Owning service team
Run az keyvault secret recover or az keyvault certificate recover. Then
restart the apps that read the value only at startup.
Roll back a bad secret value
Owner: Owning service team
List the versions with az keyvault secret list-versions. Set the last good
value again as a new version. Apps that pin a version in their Key Vault
reference need that reference updated too.
Rotate after the incident
Owner: Owning service team
Rotate every secret that was handled outside Key Vault during the incident, within 24 hours.
Rules
- Soft delete and purge protection MUST be on for every
prdvault. - New
prdvaults SHOULD use 90-day soft-delete retention. prdvaults MUST have aCanNotDeletelock andprevent_destroy.- Deleting or purging a secret, certificate, or vault SHOULD raise an alert from the Key Vault diagnostics.
- Workloads SHOULD prefer managed identities and federated credentials, so that fewer secrets exist to lose.
Gaps
| ID | Severity | Gap | Owner |
|---|---|---|---|
| DR-13 | MEDIUM | kv-den-prd-chn-01 has purge protection off | Owning service team |
| DR-14 | LOW | kv-socra-prd-chn-01 soft-delete retention not reported | SOCRA team |
Validation and drills
- Twice a year in
gma: delete and recover a test secret, and a test vault with no consumers. - Plan review: run a Resource Graph check for vaults without purge protection.