Skip to main content

lacework-global-78

3.8 Enable rotation for Key Management Service (KMS) Keys (Automated)

Profile Applicability

• Level 2

Description

AWS Key Management Service (KMS) allows customers to rotate the backing key which is key material stored within the KMS associated with the key ID of the Customer Created KMS key. The backing key performs 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. Best practices recommend enabling KMS key rotation.

Rationale

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.

Audit

From Console

  1. Sign in to the AWS Management Console and open the KMS console at: https://console.aws.amazon.com/kms.
  2. In the left navigation pane, click Customer-managed keys.
  3. Select a customer-created master key (CMK).
  4. Select the Key rotation tab.
  5. Ensure the Automatically rotate this KMS key every year checkbox is checked.

From Command Line

  1. Run the following command to get a list of all keys and their associated KeyIds
 aws kms list-keys
  1. For each key, note the KeyId and run the following command
 aws kms get-key-rotation-status --key-id <kms_key_id>
  1. Ensure KeyRotationEnabled is set to true

Remediation

From Console

  1. Sign in to the AWS Management Console and open the KMS console at: https://console.aws.amazon.com/kms.
  2. In the left navigation pane, click Customer-managed keys.
  3. Select a key that does not have automatic rotation enabled.
  4. Select the Key rotation tab.
  5. Check the Automatically rotate this KMS key every year checkbox.
  6. Click Save.
  7. Repeat steps 3-6 for all customer-managed KMS keys that do not have automatic rotation enabled.

From Command Line

  1. Run the following command to enable key rotation:
 aws kms enable-key-rotation --key-id <kms_key_id>
note

You can utilize Lacework's remediation template to resolve violations of this policy. See Remediation Templates.

References

CCE-78920-6
https://aws.amazon.com/kms/pricing/
https://csrc.nist.gov/publications/detail/sp/800-57-part-1/rev-5/final