π‘οΈ AWS KMS Key Policy allows public accessπ’
- Contextual name: π‘οΈ Key Policy allows public accessπ’
- ID:
/ce/ca/aws/kms/key-policy-public - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
- π AWS KMS Key
- π AWS KMS Key - object.extracts.yaml
- π§ͺ test-data.json
Similar Policiesβ
- AWS Security Hub: [KMS.5] KMS keys should not be publicly accessible
Descriptionβ
Descriptionβ
This policy identifies AWS KMS Keys whose key policies permit anonymous or unrestricted access.
Specifically, it evaluates key policy statements that grant permissions to all principals (using
*) without sufficient restrictive conditions to limit access to trusted and authorized AWS identities.Rationaleβ
A misconfigured KMS key policy that allows public access can expose sensitive data to unauthorized use. Attackers may be able to decrypt data stored in services such as Amazon S3, RDS, or EBS, or misuse the key to encrypt their own data, potentially associating the key with malicious activities.
Additionally, allowing unrestricted access to administrative actions (for example,
kms:PutKeyPolicy) could enable an attacker to take full control of the key, modify its policy, and permanently lock out legitimate owners.Auditβ
This policy flags an AWS KMS key as
INCOMPLIANTif its related KMS Key Policy allows the following kms: actions:
kms:Encryptkms:Decryptkms:ReEncryptFromkms:ReEncryptTo... see more
Remediationβ
Remediationβ
Update KMS Key Policyβ
From Command Lineβ
Retrieve the existing key policy and save it locally:
aws kms get-key-policy \
--key-id {{key-id}} \
--policy-name default \
--output text > policy.jsonReview and update
policy.jsonto remove any statements that grant permissions to all principals ("*").Ensure that access is restricted to explicitly defined and trusted AWS principals and that only the minimum required permissions are granted.
Apply the updated key policy:
aws kms put-key-policy \
--key-id {{key-id}} \
--policy-name default \
--policy file://policy.json
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ AWS Foundational Security Best Practices v1.0.0 β πΌ [KMS.5] KMS keys should not be publicly accessible | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Public and Anonymous Access | 113 | no data |