More Info:
S3 buckets should not allow READ access to AWS authenticated users through ACLs n order to protect your S3 data against unauthorized access.Risk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Sure, here are the step-by-step instructions to remediate the issue in AWS:
- Log in to the AWS Management Console and navigate to the S3 service.
- Select the S3 bucket that is allowing READ access to authenticated users.
- Click on the “Permissions” tab and then click on “Bucket Policy”.
- In the Bucket Policy Editor, remove any statements that allow authenticated users to read from the bucket.
- You can use the following policy to deny read access to authenticated users:
- Replace “bucket-name” with the name of your S3 bucket.
- Click on the “Save” button to apply the new policy.
- Verify that the policy has been applied correctly by attempting to access the S3 bucket as an authenticated user. You should receive an error message indicating that you do not have permission to access the bucket.
Using CLI
Using CLI
To remediate the misconfiguration of S3 bucket allowing READ access to authenticated users in AWS using AWS CLI, follow the below steps:
- Open the AWS CLI on your system.
-
Check the current bucket policy of the S3 bucket using the following command:
Replace
bucket-namewith the name of the S3 bucket. -
If the current policy allows authenticated users to read the bucket, then create a new policy that denies the read access to authenticated users. You can create a new policy using the following JSON code:
Replace
bucket-namewith the name of the S3 bucket. -
Apply the new policy to the S3 bucket using the following command:
Replace
bucket-namewith the name of the S3 bucket, andpolicy.jsonwith the name of the file containing the new policy. -
Verify the updated bucket policy using the following command:
Replace
bucket-namewith the name of the S3 bucket.
Using Python
Using Python
To remediate the misconfiguration “S3 Bucket Should Not Allow READ Access to Authenticated Users” for AWS using Python, you can follow the below steps:Step 1: Install and configure AWS SDK for Python (Boto3) on your local machine.Step 2: Write a Python script that uses Boto3 to update the S3 bucket policy to remove the read access for authenticated users. Below is an example code snippet:Step 3: Run the Python script on your local machine to update the S3 bucket policy.Once the script is executed, the bucket policy will be updated to deny read access to authenticated users.
Using Terraform
Using Terraform
terraform plan should show an aws_s3_bucket_acl resource (or an update to it) setting acl to "private" and removing any other grants.
