Terraform

Terraform

By DeepSource

keys missing expiration date TF-S1040

Security

The 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 after which the key must not be used for a cryptographic operation. As keys are not set to expire by default, it is recommended to rotate keys in the key vault and set an explicit expiration time for all keys in the Azure Key Vault. This ensures that the keys cannot be used beyond their assigned lifetimes.

Recommended

resource "azurerm_key_vault_key" "recommended" {
    ...
    expiration_date = "2022-12-25T20:00:00Z"
}