Remediation
From Azure Portalβ
- Go to
Key Vaults. - For each Key Vault, select
Keys. - In the main pane, ensure that the status of the key is
Enabled. - For each enabled key, ensure that an appropriate
Expiration dateis set.
From Azure CLIβ
Update the expiration date for the key using the following command. Use a UTC timestamp in ISO 8601 format.
az keyvault key set-attributes \
--name {{key-name}} \
--vault-name {{vault-name}} \
--expires {{expiration-date-time-utc}}
Note: To view the expiration date on all keys in a Key Vault using Microsoft API, the List Key permission is required.
To update the expiration date for the keys:
- Go to the Key Vault and select
Access policies. - Click on
Createand add an access policy with theUpdatepermission (in the Key Permissions - Key Management Operations section).
From PowerShellβ
Set-AzKeyVaultKeyAttribute `
-VaultName {{vault-name}} `
-Name {{key-name}} `
-Expires {{date-time}}