A key in Azure Key Vault has no expiration time set
Description
Azure Key Vault enables users to store and use cryptographic keys within the Microsoft Azure environment. The exp
(expiration time) attribute identifies the expiration time on or after which the key must not be used for a cryptographic operation. By default, keys never expire. Datadog recommends that keys be rotated in the key vault and set an explicit expiration time for all keys. This ensures that the keys cannot be used beyond their assigned lifetimes.
From the console
- Go to Key vaults
- For each Key vault, click on Keys
- Under the Settings section, Make sure Enabled? is set to Yes
- Set an appropriate expiration date on all keys. Using the Azure Command Line Interface, update the expiration date for the key using below command:
az keyvault key set-attributes --name <keyName> --vault-name <vaultName> --expires Y-m-d''T''H:M:S''Z''
Note: To access expiration time on all keys in Azure Key Vault using Microsoft API requires “List” Key permission. To provide required access follow below steps:
- Go to Key Vaults
- For each Key Vault, click on Access Policy
- Add access policy with Key permission as List