Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: S3 Buckets Should Prohibit Public Write Access

This rule ensures S3 buckets do not allow public write access.

RuleS3 buckets should prohibit public write access
FrameworkGxP 21 CFR Part 11
Severity
High

Rule Description:

According to the GxP 21 CFR Part 11 compliance regulations, S3 buckets should not allow public write access. This is to ensure the security and integrity of sensitive data stored in the S3 buckets, as public write access could potentially lead to unauthorized modifications or data breaches.

Troubleshooting Steps:

  1. 1.
    Verify Bucket Policies: Check the bucket policies to ensure there are no policies that allow public write access.
  2. 2.
    Review Access Control Lists (ACLs): Examine the ACLs of the S3 buckets to confirm that there are no grants or permissions that allow public write access.
  3. 3.
    Check Bucket Permissions: Validate the bucket permissions to ensure that there are no publicly writable permissions on the S3 buckets.

Necessary Code:

To deny public write access for S3 buckets, you can use the following bucket policy:

{
    "Version": "2012-10-17",
    "Id": "DenyPublicWriteAccess",
    "Statement": [
        {
            "Sid": "DenyPublicWriteACL",
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:PutObject",
            "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*",
            "Condition": {
                "Bool": {
                    "aws:SecureTransport": "false"
                }
            }
        }
    ]
}

Step-by-step Guide for Remediation:

  1. 1.
    Open the AWS Management Console and navigate to the S3 service.
  2. 2.
    Select the S3 bucket that needs to be configured.
  3. 3.
    Go to the "Permissions" tab.
  4. 4.
    Click on the "Bucket Policy" button.
  5. 5.
    Replace any existing bucket policy with the provided necessary code.
  6. 6.
    Modify the
    "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
    line, replacing YOUR_BUCKET_NAME with the actual name of your bucket.
  7. 7.
    Click "Save" to apply the new bucket policy.
  8. 8.
    Verify that public write access is denied by attempting to write an object to the S3 bucket using public permissions. It should result in an "Access Denied" error.
  9. 9.
    Monitor the S3 bucket access logs and regularly review the bucket policies to ensure compliance with the prohibition of public write access.

Is your System Free of Underlying Vulnerabilities?
Find Out Now