Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 461 #483

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions en/aws/s3/s3-bucket-all-users-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@
| **Recommended Action** | Remove wildcard principals from the bucket policy statements. |

## Detailed Remediation Steps
1. Log into the AWS Management Console.
1. Log in to the AWS Management Console.
2. Select the "Services" option and search for S3. </br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step2.png"/>
3. Scroll down the left navigation panel and choose "Buckets".</br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step3.png"/>
4. Select the "Bucket" that needs to be verified and click on its identifier(name) from the "Bucket name" column.</br><img src="/resources/aws/s3/s3-bucket-all-users-policy/step4.png"/>
5. Click on the "Permissions" tab on the top menu. </br><img src="/resources/aws/s3/s3-bucket-all-users-policy/step5.png"/>
6. Check the "Bucket Policy" option under "Properties" abd check the "Effect" and "Principal" value.If the "Effect" element value is set to "Allow" and the "Principal" element value is set to everyone ( * ) then the selected S3 bucket is publicly accessible. </br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step6.png"/>
7. Repeat steps number 2 - 6 to verify other S3 buckets in the region. </br>
8. Select the publicly accessible S3 bucket that needs to configure and click on the "Permissions" tab and click on the "Bucket Policy" option. </br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step8.png"/>
9. In the "Bucket Policy" option either remove the public accessibility by deleting the policy for the selected S3 bucket. Click on the "Delete" option at the top and click on "Delete" button on the "Delete Bucket Policy" tab.</br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step9.png"/>
10. In order to limit the public accessibility replace the Principal element current value with the Amazon Resource Name (ARN) ( e.g. { "AWS": "arn:aws:iam::102604298007:role/aws-elasticbeanstalk-ec2-role" } ) of the AWS account that should have access to the selected S3 bucket.</br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step10.png"/>
11. Click on the save button at the top to make the necessary changes. </br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step11.png"/>
12. Repeat steps number 8 - 11 to remove wildcard principals for other S3 buckets. </br>
6. Check the "Bucket Policy" option under "Permissions" and check the "Effect" and "Principal" value. If the "Effect" element value is set to "Allow" and the "Principal" element value is set to everyone ( * ) then the selected S3 bucket is publicly accessible. </br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step6.png"/>
7. Under the "Bucket policy" click "Edit" and replace the Principal element current value with the Amazon Resource Name (ARN) ( e.g. { "AWS": "arn:aws:iam::102604298007:role/aws-elasticbeanstalk-ec2-role" } ) of the AWS account that should have access to the selected S3 bucket.</br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step7.png"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
7. Under the "Bucket policy" click "Edit" and replace the Principal element current value with the Amazon Resource Name (ARN) ( e.g. { "AWS": "arn:aws:iam::102604298007:role/aws-elasticbeanstalk-ec2-role" } ) of the AWS account that should have access to the selected S3 bucket.</br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step7.png"/>
7. Under the "Bucket policy" click "Edit" and replace the Principal element current value with the ARN of AWS account that should have access to the selected S3 bucket.</br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step7.png"/>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image should match with the step description given here

8. Click on the "Save changes" to make the necessary changes. </br> <img src="/resources/aws/s3/s3-bucket-all-users-policy/step8.png"/>
9. Repeat steps number 4-8 to remove wildcard principals for other S3 buckets.</br>
Binary file not shown.
Binary file not shown.
Binary file modified resources/aws/s3/s3-bucket-all-users-policy/step2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/s3/s3-bucket-all-users-policy/step3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/s3/s3-bucket-all-users-policy/step4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/s3/s3-bucket-all-users-policy/step5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/s3/s3-bucket-all-users-policy/step6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/aws/s3/s3-bucket-all-users-policy/step8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.