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

❗ NOTICE (cdk): removal of AccessControl property from bootstrap template in v2.106.0 can result in public access on bootstrap buckets #27964

Closed
colifran opened this issue Nov 13, 2023 · 3 comments
Assignees
Labels
management/tracking Issues that track a subject or multiple issues p0

Comments

@colifran
Copy link
Contributor

colifran commented Nov 13, 2023

Please add your +1 πŸ‘ to let us know you have encountered this

Status

Resolved

What is the issue?

A PR was merged which removed the legacy AccessControl property from the bootstrap template. Users who remove the public access block using the public-access-block-configuration cli flag will see bootstrapped buckets are created with public access and ACLs enabled by default.

Error message

No response

What is the impact?

S3 buckets created during bootstrapping will be created with all public access and all ACLs enabled by default.

Workaround

Upgrade to aws-cdk v2.106.1.

Who is affected?

Users bootstrapping regions using aws-cdk v2.106.0.

How do I resolve this?

Upgrade to aws-cdk v2.106.1.

Related issues

No response

@colifran colifran added management/tracking Issues that track a subject or multiple issues p0 labels Nov 13, 2023
@colifran colifran changed the title ❗ NOTICE (cdk): removal of AccessControl property from bootstrap template in v2.106.0 can result in public access on bootstrap bucket ❗ NOTICE (cdk): removal of AccessControl property from bootstrap template in v2.106.0 can result in public access on bootstrap buckets Nov 13, 2023
@colifran colifran pinned this issue Nov 13, 2023
mergify bot pushed a commit to cdklabs/aws-cdk-notices that referenced this issue Nov 13, 2023
@colifran colifran self-assigned this Nov 14, 2023
@laurelmay
Copy link
Contributor

To understand the severity of this issue as a user a bit more as well, does this actually make the bucket and objects public? Or does it make it so the bucket and objects can be public? Wouldn't either the public-read or a bucket policy equivalent to the following need to be applied to actually make anything public?

Dangerous Bucket Policy
{
  "Version":"2012-10-17",
  "Statement":[
    {
      "Sid": "PublicAccess",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "${Bucket.Arn}/*"
    }
  ]
}

If it immediately makes all object in the bucket actually public (bootstrapping with v2.106.0 automatically makes it so anyone can s3:GetObject anything in my StagingBucket) then this is especially severe. If it makes it so that applying a bad ACL or Bucket Policy (in addition to passing --no-public-access-block-configuration) then this feels a bit less severe.

Documentation Issues

This probably also highlights a need for updates to the CloudFormation resource docs and the service docs.

The second one especially seems to be at issue here. Is Private the default or is it that by default in Private no else has access rights but the default can be changed to grant access to others? If so, the service docs REALLY need to be more clear about that but frankly CloudFormation needs to do a better job of communicating what happens. If Private is the default it's unclear how anything is different here from before that PR.

@colifran
Copy link
Contributor Author

Closed with this revert.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
management/tracking Issues that track a subject or multiple issues p0
Projects
None yet
Development

No branches or pull requests

2 participants