This rule ensures S3 buckets restrict public read access for security.
Rule | S3 buckets should prohibit public read access |
Framework | CISA-cyber-essentials |
Severity | ✔ Medium |
Rule Description
The S3 buckets should be configured to prohibit public read access for CISA-cyber-essentials compliance. This rule ensures that no unauthorized individuals or entities can read the contents of the S3 buckets, thus protecting sensitive data and maintaining data privacy and security.
Troubleshooting Steps (if applicable)
Necessary Codes (if applicable)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyPublicReadAccess",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<bucket-name>/*"
}
]
}
Step-by-Step Guide for Remediation
Identify the S3 buckets that require remediation.
Access the AWS Management Console and navigate to the Amazon S3 service.
Select the appropriate bucket that needs to have its public read access prohibited.
Click on the "Permissions" tab.
In the "Bucket Policy" section, click on the "Edit" button.
Replace any existing bucket policy with the following JSON code:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "DenyPublicReadAccess", "Effect": "Deny", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::<bucket-name>/*" } ] }
Replace
<bucket-name>
with the name of your actual bucket.Click on the "Save changes" button to apply the new policy.
Repeat steps 3-7 for each S3 bucket that needs to have public read access prohibited.
Validate the changes by attempting to access the bucket's contents without proper authorization. It should deny access to the public.
Perform regular audits to ensure the bucket policies are consistently enforcing the prohibition of public read access.
Note: It is also recommended to review and update the IAM policies associated with the S3 buckets to ensure they do not grant public access permissions.
By following these steps, you can successfully prohibit public read access for CISA-cyber-essentials compliance in your S3 buckets.