Information
Restrict the validity period of certificates stored in Azure Key Vault to 12 months or less.
Limiting certificate validity reduces the risk of misuse if compromised and helps ensure timely renewal, improving security and reliability.
NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.
Solution
Remediate from Azure Portal
- Go to Key vaults.
- Click the name of a key vault.
- Under Objects, click Certificates.
- Click the name of a certificate.
- Click Issuance Policy.
- Set Validity Period (in months) to an integer between 1 and 12, inclusive.
- Click Save.
- Repeat steps 1-7 for each key vault and certificate requiring remediation.
Remediate from PowerShell
For each certificate requiring remediation, run the following command to set ValidityInMonths to an integer between 1 and 12, inclusive:
Set-AzKeyVaultCertificatePolicy -VaultName $vault.VaultName -Name <certificate-name> -ValidityInMonths <validity-in-months>
Impact:
Minor administrative effort required to ensure certificate renewal and lifecycle management.