Cloud Defense Logo

Products

Solutions

Company

Rule: S3 Public Access Block at Bucket Levels

This rule ensures blocking S3 public access at bucket levels for security measures.

RuleS3 public access should be blocked at bucket levels
FrameworkFedRAMP Low Revision 4
Severity
High

Rule Description

The rule states that S3 public access should be blocked at the bucket level for FedRAMP Low Revision 4 compliance. This ensures that no unauthorized or public access is granted to the data stored in S3 buckets, reducing the risk of data breaches or unauthorized exposure.

Troubleshooting Steps

If S3 public access is not blocked at the bucket level for FedRAMP Low Revision 4, you can follow these troubleshooting steps to ensure compliance:

  1. 1.

    Identify the affected S3 bucket(s):

    • Use the AWS Management Console, AWS CLI, or AWS SDKs to list all S3 buckets in your account.
    • Identify the buckets that have public access enabled.
  2. 2.

    Review bucket permissions and access control lists (ACLs):

    • Check the bucket policies and ACLs for each identified bucket.
    • Ensure that there are no policies or ACLs that allow public access to the bucket.
    • Specifically, check for any "public-read" or "public-read-write" permissions.
  3. 3.

    Review bucket access points and block public access settings:

    • If using S3 access points, ensure that they are configured correctly and do not enable public access.
    • Review the block public access settings for each bucket.
    • Ensure that the "Block all public access" option is enabled.
  4. 4.

    Test public access:

    • Attempt to access the buckets using public URLs or anonymous requests.
    • If successful, identify the misconfigured ACL, policy, or block public access setting.

Necessary Codes

In order to block public access at the bucket level for FedRAMP Low Revision 4 compliance, you can utilize the following code snippets:

  1. 1.
    To block public access using the AWS CLI:
aws s3api put-public-access-block --bucket <bucket-name> --public-access-block-configuration "BlockPublicAcls=true, IgnorePublicAcls=true, BlockPublicPolicy=true, RestrictPublicBuckets=true"

Replace

<bucket-name>
with the name of the bucket you want to block public access for. Run the command for each affected bucket.

  1. 1.
    To configure public access block settings using the AWS CLI:
aws s3api put-public-access-block --bucket <bucket-name> --public-access-block-configuration "BlockPublicAcls=true, IgnorePublicAcls=true, BlockPublicPolicy=true, RestrictPublicBuckets=true"

Replace

<bucket-name>
with the name of the bucket for which you want to configure public access block settings.

Step-by-Step Guide for Remediation

Follow these step-by-step instructions to remediate the S3 bucket public access issue for FedRAMP Low Revision 4 compliance:

  1. 1.

    Identify the affected S3 bucket(s):

    • Log in to the AWS Management Console.
    • Navigate to the S3 service.
  2. 2.

    Review bucket permissions and access control lists (ACLs):

    • Select and click on the identified bucket.
    • Go to the "Permissions" tab.
    • Review the bucket policy and access control list (ACL) settings.
    • Remove any policies or ACLs that grant public access to the bucket.
    • Ensure "public-read" and "public-read-write" permissions are not present.
  3. 3.

    Review bucket access points and block public access settings:

    • In the same "Permissions" tab, look for the "Access points" section.
    • Verify that access points are properly configured and do not enable public access.
    • Scroll down to the "Block public access" section.
    • Ensure that the "Block all public access" option is enabled.
    • Check that the individual settings under "Block public access" are also enabled.
  4. 4.

    Test public access:

    • Attempt to access the buckets using public URLs or anonymous requests to ensure public access is blocked.
    • If any issues are found, review the ACLs, policies, or block public access settings again.
  5. 5.

    Repeat the above steps for each affected S3 bucket.

  6. 6.

    (Optional) Automate the process using AWS CLI or AWS SDKs to enforce bucket-level public access block settings across multiple buckets.

By following these steps, you will be able to block S3 public access at the bucket level, ensuring compliance with FedRAMP Low Revision 4 standards.

Is your System Free of Underlying Vulnerabilities?
Find Out Now