Description
authenticated-read gives the owner full control and grants READ to AuthenticatedUsers. This group includes signed requests from every AWS account, including those outside your organization. Anonymous requests are outside the group.
Potential impact
With an effective bucket grant, external accounts can list object names. A grant on an individual object can expose its contents and metadata.
Remediation
Replace broad bucket and object grants with policies naming the required accounts and roles. After preserving legitimate access, remove the grants, disable ACLs where possible, and apply Block Public Access. Test an approved account and verify that an unapproved external account is denied.
Examples
Use bucket_name for the existing ACL-enabled bucket. Block Public Access can reject or ignore the first ACL. Keep those protections in place.
Listing access for every AWS account
- name: Set a bucket ACL
amazon.aws.s3_bucket:
name: "{{ bucket_name }}"
state: present
acl: authenticated-read
The Ansible task grants external AWS accounts listing access on this bucket if the ACL takes effect. Reading the listed files requires separate permission.
Owner-only ACL
- name: Set a bucket ACL
amazon.aws.s3_bucket:
name: "{{ bucket_name }}"
state: present
acl: private
private leaves only the owner on the bucket ACL. Review object ACLs and policies for other grants. If ACLs are disabled, use policies directly.