More Info:

This rule checks if the managed AWS Identity and Access Management (IAM) policies that you create do not allow blocked actions on AWS Key Management Service (KMS) keys. The rule is NON_COMPLIANT if any blocked action is allowed on AWS KMS keys by the managed IAM policy. Note that this rule does not evaluate the conditions provided in IAM policies.

Risk Level

Medium

Address

Security

Compliance Standards

CBP

Triage and Remediation

How to Prevent

To prevent blocked KMS actions in IAM policies using the AWS Management Console, follow these steps:

  1. Navigate to IAM Policies:

    • Open the AWS Management Console.
    • In the navigation pane, choose “Policies” under the “Access management” section.
  2. Create or Edit a Policy:

    • To create a new policy, click on the “Create policy” button.
    • To edit an existing policy, find the policy you want to modify and click on its name, then click the “Edit policy” button.
  3. Add KMS Permissions:

    • In the policy editor, switch to the “JSON” tab.
    • Ensure that the policy includes the necessary KMS actions (e.g., kms:Encrypt, kms:Decrypt, kms:GenerateDataKey) and does not include any actions that should be blocked.
    • Example JSON snippet:
      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "kms:Encrypt",
              "kms:Decrypt",
              "kms:GenerateDataKey"
            ],
            "Resource": "*"
          }
        ]
      }
      
  4. Review and Save:

    • After adding the necessary permissions, click on the “Review policy” button.
    • Provide a name and description for the policy if creating a new one.
    • Click on the “Create policy” or “Save changes” button to apply the policy.

By following these steps, you can ensure that your IAM policies are correctly configured to allow necessary KMS actions while preventing any blocked actions.