π‘οΈ AWS IAM Role Inline Policy allows KMS decryption actions on all KMS keysπ’
- Contextual name: π‘οΈ Role Inline Policy allows KMS decryption actions on all KMS keysπ’
- ID:
/ce/ca/aws/iam/role-inline-policy-allows-kms-decrypt-on-all-keys - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Statsβ
not available
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 role inline policy allows KMS decryption actions on all AWS KMS keys.
Rationaleβ
IAM role inline policies should follow least privilege and grant access only to the KMS keys that a workload, service, or automation path explicitly requires.
If a role inline policy allows
kms:Decrypt,kms:ReEncryptFrom, or broader KMS decryption-related actions against*or wildcard KMS key ARNs, any principal that can assume the role can potentially decrypt data protected by keys outside its intended boundary. This increases the blast radius of role compromise, policy misconfiguration, and privilege escalation.Impactβ
Restricting wildcard KMS access can require updates to applications, automation, cross-service integrations, or delegated administration workflows that currently rely on broad permissions. Before tightening the policy, identify the exact KMS keys the role must use and validate the updated access in a non-production environment when possible.
Auditβ
This policy flags an AWS IAM Role Policy as
INCOMPLIANTwhen all of the following are true:... see more
Remediationβ
Remediationβ
Restrict KMS key scopeβ
Perform the following to update the IAM role 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-role-policy \
--role-name {{role-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 role requires.
Apply the updated inline policy:
aws iam put-role-policy \
--role-name {{role-name}} \
--policy-name {{policy-name}} \
--policy-document file://policy.jsonNotesβ
Grant
kms:Decryptandkms:ReEncryptFromonly for the KMS keys that the role 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*.