Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: S3 Access Control Lists (ACLs) Management

Ensure compliance by not using ACLs to manage user access in S3 buckets.

RuleS3 access control lists (ACLs) should not be used to manage user access to buckets
FrameworkAWS Foundational Security Best Practices
Severity
Medium

Rule Description:

The rule states that S3 access control lists (ACLs) should not be used to manage user access to buckets for AWS Foundational Security Best Practices. Instead, IAM policies should be utilized to control and manage user access to S3 buckets.

Explanation:

By default, S3 buckets are private, meaning only the bucket owner has access to the stored data. To grant access to other users or entities, proper access control should be implemented. AWS offers two methods to control access to S3 resources: Access Control Lists (ACLs) and Identity and Access Management (IAM) policies.

Troubleshooting Steps:

If ACLs are currently being used to manage user access to S3 buckets, follow these troubleshooting steps to ensure compliance with the best practice:

  1. 1.
    Identify the buckets that are using ACLs for access control.
  2. 2.
    Review and verify the current ACL configuration for each bucket.
  3. 3.
    Determine which users or entities have been granted access through ACLs.
  4. 4.
    Create and configure new IAM policies to replace the existing ACLs.
  5. 5.
    Test the newly created IAM policies to ensure they provide the intended access privileges.
  6. 6.
    Remove the ACLs from the buckets and apply the newly created IAM policies.
  7. 7.
    Monitor access to the buckets to ensure users have the appropriate permissions as per the IAM policies.

Necessary Codes:

In order to remediate this issue, you will need to create and configure IAM policies to control user access to the S3 buckets. Below is an example IAM policy that allows read and write access to an S3 bucket:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::your-bucket-name/*",
        "arn:aws:s3:::your-bucket-name"
      ]
    }
  ]
}

Replace "your-bucket-name" with the actual name of your S3 bucket. This policy grants read and write access to both the bucket and the objects within it.

Step-by-Step Guide for Remediation:

Follow these steps to remediate the issue and adhere to the best practice:

  1. 1.
    Identify the S3 buckets that are currently using ACLs for access control.
  2. 2.
    Review the ACLs for each bucket to understand the current access permissions.
  3. 3.
    Create an IAM policy that aligns with the desired access permissions for the users.
  4. 4.
    Open the IAM Management Console.
  5. 5.
    Navigate to "Policies" in the left navigation menu.
  6. 6.
    Click on "Create policy" and select the "JSON" tab.
  7. 7.
    Enter a name and description for the new policy.
  8. 8.
    Copy and paste the desired IAM policy code into the JSON editor.
  9. 9.
    Click on "Review policy" to verify the policy's details.
  10. 10.
    Once verified, click on "Create policy" to save it.
  11. 11.
    Next, identify the IAM users who require access to the S3 buckets.
  12. 12.
    Open the IAM Management Console and navigate to "Users" in the left navigation menu.
  13. 13.
    Locate the desired user and click on their username to access their user details.
  14. 14.
    In the "Permissions" tab, click on "Add permissions" and select "Attach existing policies".
  15. 15.
    Search for and select the newly created policy that aligns with the desired access permissions.
  16. 16.
    Click on "Next" and review the policy's overview.
  17. 17.
    Once reviewed, click on "Add permissions" to attach the policy to the user.
  18. 18.
    Repeat steps 13 to 17 for each IAM user that requires access.
  19. 19.
    Test the access by attempting to access the S3 buckets with the respective IAM user accounts.
  20. 20.
    Monitor access and permissions regularly to ensure compliance with the new IAM policies.

By following these steps, you will successfully remediate the use of S3 ACLs for managing user access to buckets and adhere to the AWS Foundational Security Best Practices.

Is your System Free of Underlying Vulnerabilities?
Find Out Now