Ensure KMS has a rotation policy

Error: Rotation for customer created CMKs is disabled

Bridgecrew Policy ID: BC_AWS_GENERAL_51
Checkov Check ID: CKV_AWS_132
Severity: HIGH

Rotation for customer created CMKs is disabled

Description

AWS Key Management Service (KMS) allows customers to rotate the backing key which is key material stored within the KMS which is tied to the key ID of the Customer Created customer master key (CMK). It is the backing key that is used to perform cryptographic operations such as encryption and decryption. Automated key rotation currently retains all prior backing keys so that decryption of encrypted data can take place transparently. It is recommended that CMK key rotation be enabled.
Rotating encryption keys helps reduce the potential impact of a compromised key as data encrypted with a new key cannot be accessed with a previous key that may have been exposed.

Fix - Buildtime

Terraform

  • Resource: aws_kms_key
  • Argument: enable_key_rotation
resource "aws_kms_key" "example" {                    
  name                = "example"
+ enable_key_rotation = true
}

Did this page help you?