๐ก๏ธ AWS IAM User Inline Policy allows KMS decryption actions on all KMS keys๐ข
- Contextual name: ๐ก๏ธ User Inline Policy allows KMS decryption actions on all KMS keys๐ข
- ID:
/ce/ca/aws/iam/user-inline-policy-allows-kms-decrypt-on-all-keys - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- AWS Security Hub: [KMS.2] IAM principals should not have IAM inline policies that allow decryption actions on all KMS keys
Descriptionโ
Descriptionโ
This policy checks whether an IAM user inline policy allows KMS decryption actions on all AWS KMS keys.
Rationaleโ
IAM user inline policies should follow least privilege and grant access only to the KMS keys that a user explicitly requires.
If a user inline policy allows
kms:Decrypt,kms:ReEncryptFrom, or broader KMS decryption-related actions against*or wildcard KMS key ARNs, the user can potentially decrypt data protected by keys outside the intended boundary. This increases the blast radius of user credential compromise, policy misconfiguration, and privilege escalation.Impactโ
Restricting wildcard KMS access can require updates to user workflows, CLI tooling, scripts, or legacy operational procedures that currently rely on broad permissions. Before tightening the policy, identify the exact KMS keys the user must access and validate the updated permissions in a non-production environment when possible.
Auditโ
This policy flags an AWS IAM User Policy as
INCOMPLIANTwhen all of the following are true:... see more
Remediationโ
Remediationโ
Restrict KMS key scopeโ
Perform the following to update the IAM user inline policy by replacing wildcard KMS resources with the specific KMS key ARNs that should be allowed and, where possible, narrowing broad KMS actions.
From Command Lineโ
Retrieve the current inline policy document:
aws iam get-user-policy \
--user-name {{user-name}} \
--policy-name {{policy-name}}Update the policy document so that KMS decryption permissions are limited to only the specific KMS key ARNs that the user requires.
Apply the updated inline policy:
aws iam put-user-policy \
--user-name {{user-name}} \
--policy-name {{policy-name}} \
--policy-document file://policy.jsonNotesโ
Grant
kms:Decryptandkms:ReEncryptFromonly for the KMS keys that the user inline policy should allow.Where possible, also narrow the allowed actions so the policy does not rely on broad permissions such as
kms:*orkms:ReEncrypt*.