Remediation
From Azure Portalβ
- Go to
Key Vaults. - For each Key Vault, select
Secrets. - In the main pane, ensure that the status of the secret is
Enabled. - For each enabled secret, ensure that an appropriate
Expiration dateis set.
From Azure CLIβ
Update the Expiration date for the secret using the following command. Use a UTC timestamp in ISO 8601 format.
az keyvault secret set-attributes \
--name {{secret-name}} \
--vault-name {{vault-name}} \
--expires {{expiration-date-time-utc}}
Note: To view the expiration date on all secrets in a Key Vault using Microsoft API, the List permission for secrets is required.
To update the expiration date for the secrets:
- Go to the Key Vault and select
Access Control (IAM). - Select
Add role assignmentand assign theKey Vault Secrets Officerrole to the appropriate user.
From PowerShellβ
Set-AzKeyVaultSecretAttribute `
-VaultName {{vault-name}} `
-Name {{secret-name}} `
-Expires {{date-time}}