Risk Level: Medium
Description
This plugin ensures KMS keys rotation is set on a regular schedule. KMS key rotation ensures that extensive reuse of encryption keys are not allowed. Cryptographic best practice discourages repetition of encryption keys for a long period of time. The primary properties of the KMS key, such as its key ID, key ARN, region, policies, and permissions, do not change on key rotation.
About the Service
AWS Key Management Service (KMS): AWS KMS is a storehouse of cryptographic keys that can be easily utilized by your AWS resources and applications. Encryption with KMS keys ensures that your resources and applications are secured with centralized management. Logs can also be generated to audit key usage across various services. All the keys are properly secured by AWS KMS.
Impact
Key rotation minimizes the chance of exposure to an attacker. Since a new cryptographic key will be generated on a regular basis, it will become difficult for an attacker to decode the key. It is recommended to rotate KMS keys automatically.
Steps to Reproduce
Using AWS Console-
- Log In to your AWS Console.
- Open the AWS KMS Console. You can use this link (https://console.aws.amazon.com/kms/) to navigate directly if already logged in.
- From the left navigation pane, click on Customer-managed keys.
- A list of CMK keys in the region will be displayed. Select the key you want to examine by clicking on it’s Key ID.
- Move to the Key rotation tab.
- Check the value of Automatically rotate this KMS key every year. If it is left unchecked, the vulnerability exists.
- Repeat steps for all the keys you wish to examine.
Steps for Remediation
Enable yearly rotation for the KMS key.
- Log In to your AWS Console.
- Open the AWS KMS Console. You can use this link (https://console.aws.amazon.com/kms/) to navigate directly if already logged in.
- From the left navigation pane, click on Customer-managed keys.
- A list of CMK keys in the region will be displayed. Select the vulnerable key by clicking on it’s Key ID.
- Move to the Key rotation tab.
- Enable Automatically rotate this KMS key every year by enabling the checkbox next to it.
- Repeat steps for all the vulnerable keys.