๐ก๏ธ AWS IAM Customer Managed Policy allows KMS decryption actions on all KMS keys๐ข
- Contextual name: ๐ก๏ธ Customer Managed Policy allows KMS decryption actions on all KMS keys๐ข
- ID:
/ce/ca/aws/iam/customer-managed-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๐ข
- ๐ AWS IAM Policy
- ๐ AWS IAM Policy - object.extracts.yaml
- ๐งช test-data.json
Similar Policiesโ
- AWS Security Hub: [KMS.1] IAM customer managed policies should not allow decryption actions on all KMS keys
Descriptionโ
Descriptionโ
This policy checks whether a customer managed IAM policy allows KMS decryption actions on all AWS KMS keys.
Rationaleโ
Customer managed IAM policies should follow least privilege and grant access only to the KMS keys that a workload, service, or user explicitly requires.
If a customer managed policy allows
kms:Decrypt,kms:ReEncryptFrom, or broader KMS decryption-related actions against*or wildcard KMS key ARNs, any principal that receives the policy can potentially decrypt data protected by keys outside its intended boundary. This increases the blast radius of credential misuse, policy misassignment, and privilege escalation.Impactโ
Restricting wildcard KMS access can require updates to applications, automation, or delegated administration workflows that currently rely on broad permissions. Before tightening the policy, identify the exact KMS keys each intended principal must use and validate the updated access in a non-production environment when possible.
Auditโ
This policy flags an AWS IAM Policy as
INCOMPLIANTwhen all of the following are true:... see more
Remediationโ
Remediationโ
Restrict KMS key scopeโ
Perform the following to update the customer managed IAM 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โ
Identify the policy and its default version:
aws iam get-policy \
--policy-arn {{policy-arn}}Retrieve the current policy document:
aws iam get-policy-version \
--policy-arn {{policy-arn}} \
--version-id {{default-version-id}}Update the policy document so that KMS decryption permissions are limited to the specific KMS key ARNs that are required.
Create a new policy version and set it as the default:
aws iam create-policy-version \
--policy-arn {{policy-arn}} \
--policy-document file://policy.json \
--set-as-defaultIf the policy already has five versions, delete an older non-default version and then create the new version:
aws iam delete-policy-version \... see more