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

aws-s3-private-bucket set ignore_public_acls and restrict_public_buckets #124

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

mbarrien
Copy link
Contributor

This PR strengthens the aws-s3-private-bucket module by setting 2 more flags ignore_public_acls and restrict_public_buckets that tell S3 to ignore existing policies that can make a bucket more public than intended.

The 2 previously set flags of block_public_acls and block_public_policy only prevent setting policies that could open up the bucket, but do not touch or affect the behavior of existing policies that make files/buckets public or available cross-account. This PR tells S3 to ignore the existing policies and block access even when nominally allowed by the existing policies.

I intentionally have not made these overridable for now; if there are use cases where overriding this is desired, we can add that now or in a later PR.

See https://www.terraform.io/docs/providers/aws/r/s3_bucket_public_access_block.html#argument-reference for more details.

@mbarrien mbarrien requested a review from alldoami September 17, 2019 16:42
@mbarrien mbarrien requested a review from a team as a code owner September 17, 2019 16:42
Copy link
Contributor

@edulop91 edulop91 left a comment

Choose a reason for hiding this comment

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

ty

@mbarrien mbarrien merged commit 2faeae6 into master Sep 17, 2019
@mbarrien mbarrien deleted the mbarrien/s3-private-bucket branch September 17, 2019 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants