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

Feat: Add Support for S3 Object Ownership Controls #209

Merged
merged 5 commits into from
Jan 12, 2022

Conversation

korenyoni
Copy link
Member

@korenyoni korenyoni commented Jan 12, 2022

what

  • Add support for S3 object ownership controls.
  • Misc: add BridgeCrew exceptions.

why

S3 object ownership controls should be configurable for the origin bucket behind the CloudFront distribution. If the origin bucket is used within CI pipelines, cross-account writes to the bucket will result in the object being owned by that account. This can result in 403's when attempting to access content in the CF distribution, unless the S3 object ownership setting is set to BucketOwnerEnforced.

By default, when another AWS account uploads an object to your S3 bucket, that account (the object writer) owns the object, has access to it, and can grant other users access to it through ACLs.

The new S3 object ownership variable has as a default value that has the same effect if the new s3_bucket_ownership_controls were not to exist at all. Thus, this is a backwards-compatible release.

references

@korenyoni korenyoni requested review from a team as code owners January 12, 2022 15:12
@korenyoni korenyoni requested review from dylanbannon and brcnblc and removed request for a team January 12, 2022 15:12
@korenyoni korenyoni added the no-release Do not create a new release (wait for additional code changes) label Jan 12, 2022
Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

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

Bridgecrew has found infrastructure configuration errors in this PR ⬇️

main.tf Outdated Show resolved Hide resolved
main.tf Outdated Show resolved Hide resolved
Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

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

⚠️   Due to 42a9ec7 - Auto Format - 2 errors were fixed.

Change details

Error ID Change Path Resource
BC_AWS_NETWORKING_65 Fixed /main.tf aws_cloudfront_distribution.default
BC_AWS_NETWORKING_63 Fixed /main.tf aws_cloudfront_distribution.default

@korenyoni
Copy link
Member Author

/test all

max-lobur
max-lobur previously approved these changes Jan 12, 2022
@korenyoni
Copy link
Member Author

korenyoni commented Jan 12, 2022

Breaking because of new plan-time validation in https://github.com/hashicorp/terraform-provider-aws/releases/tag/v3.71.0

EDIT: fixed by #208

@mergify mergify bot dismissed max-lobur’s stale review January 12, 2022 18:07

This Pull Request has been updated, so we're dismissing all reviews.

@korenyoni
Copy link
Member Author

/test all

@korenyoni korenyoni merged commit 911db9b into master Jan 12, 2022
@korenyoni korenyoni deleted the feat/s3-bucket-ownership-controls branch January 12, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants