Ensure that all the secret keys available within your Microsoft Azure Key Vault have an expiration date/time set in order to follow security best practices and promote secret key rotation. The expiration parameter configured for an Azure secret identifies the expiration time after which the secret key must not be used anymore for storing sensitive data such as passwords and database connection strings.
This rule resolution is part of the Conformity Security & Compliance tool for Azure.
Microsoft Azure Key Vault enables you to store and keep secrets within your Azure cloud environment. By default, these secret keys never expire, therefore it is strongly recommended to configure all the secret keys with an explicit expiration date/time to enforce secret rotation as an additional layer of protection. This should significantly reduce the chance that a compromised secret could be used without your knowledge to access important Azure resources such as SQL databases.
Audit
To determine if your Azure Key Vault secret keys have an expiration time set, perform the following actions:
Remediation / Resolution
To configure an expiration date and time for your Microsoft Azure secrets in order to enforce periodic rotation of secret keys, perform the following actions:
References
- Azure Official Documentation
- Azure Key Vault basic concepts
- About keys, secrets, and certificates
- CIS Microsoft Azure Foundations
- Azure Command Line Interface (CLI) Documentation
- az keyvault key
- az keyvault list
- az keyvault secret list
- az keyvault secret show
- az keyvault secret set-attributes