| name | cis-azure-foundations-8.3.1 |
| description | Ensure that the Expiration Date is set for all Keys in RBAC Key Vaults |
| category | cis-azure-foundations |
| version | 5.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","security","key-vault","keys","expiration"] |
| cis_id | 8.3.1 |
| cis_benchmark | CIS Microsoft Azure Foundations Benchmark v5.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
8.3.1 Ensure that the Expiration Date is set for all Keys in RBAC Key Vaults (Automated)
Description
Ensure that all cryptographic keys stored in Azure Key Vaults using RBAC (Role-Based Access Control) authorization have an expiration date configured.
Rationale
Cryptographic keys without expiration dates remain valid indefinitely, which violates the principle of key rotation and increases the risk of key compromise over time. Setting an expiration date ensures that keys are periodically reviewed and rotated, reducing the window of exposure if a key is compromised. This is a fundamental cryptographic hygiene practice required by most compliance frameworks including PCI DSS, HIPAA, and SOC 2.
Impact
Setting expiration dates on keys requires organizations to implement key rotation processes. When a key expires, any application or service relying on that key will fail until the key is renewed or replaced. Organizations must plan for key rotation well before expiration to avoid service disruptions.
Audit Procedure
From Azure Portal:
- Go to
Key vaults.
- For each Key Vault with RBAC authorization enabled, click the vault name.
- Under
Objects, click Keys.
- For each key, verify that the
Expiration date column shows a date (not blank or 'Not set').
From Azure CLI:
az keyvault list --query "[?properties.enableRbacAuthorization==\`true\`].name" -o tsv
For each RBAC-enabled Key Vault:
az keyvault key list --vault-name {vaultName} --query "[].{Name:name, Expires:attributes.expires}" -o table
Ensure Expires is set for all keys.
From PowerShell:
$vaults = Get-AzKeyVault | Where-Object { $_.EnableRbacAuthorization -eq $true }
foreach ($vault in $vaults) {
Get-AzKeyVaultKey -VaultName $vault.VaultName | Select-Object Name, Expires
}
Ensure Expires is populated for all keys.
Expected Result
All keys in RBAC-enabled Key Vaults should have an expiration date set.
Remediation
From Azure Portal:
- Go to
Key vaults.
- Click the name of a Key Vault.
- Under
Objects, click Keys.
- Click the key that needs an expiration date.
- Click the current version of the key.