-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix(s3): updating blockPublicAccess to enable default true settings (under feature flag) #33702
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
Conversation
…under feature flag)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33702 +/- ##
=======================================
Coverage 83.98% 83.98%
=======================================
Files 120 120
Lines 6976 6976
Branches 1178 1178
=======================================
Hits 5859 5859
Misses 1005 1005
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Don't approve this until #33796 is merged, so I can handle the conflicts |
Another ff was added without a readme.. |
please wait for #33867 so I can resolve conflict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This pull request has been removed from the queue for the following reason: The pull request can't be updated. You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
hmm there's a new one |
Pull request has been modified.
Please hold of making any changes. We are looking into this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving on @QuantumNeuralCoder's behalf as the auto-merge should work now.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
@IkeNefcy can you fix the merge conflicts? Thank you! |
Will do in a few |
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving again as merge conflict is addressed
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
V3 but I think we got there
Issue
Closes #32811
Reason for this change
By default when you create an s3 bucket, all public access is already blocked. However if you then use CDK to specify 1 or more access point you want to unblock, all undefined block types will be auto set to false, and when it deploys you will see everything uncheck even if you only wanted to uncheck 1 thing.
So to fix this we should instead default all values to true when at least 1 option is specified, to mimic to experience when a user in the console unchecks the boxes.
Description of changes
deprecating
BLOCK_ACLS
method ofBlockPublicAccess
. AddingBLOCK_ACLS_ONLY
.This is just a general revamp to match what the feature will bring, it's separate from the feature itself. The point being that for any shortcut methods like this, we should be specifying all 4 options to ensure the default true behavior remains.
Created function
setBlockPublicAccessDefaults()
but this method is only called if the FF is enabled
Of course the FF itself was added.
Description of how you validated changes
Added tests that are duplicates of others, just testing for both behaviors with and without the FF.
Also added an integ that just tests different combinations of the blocking.
aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-block-access.ts
Lines 1 to 42 in 51ffe21
There was no
BlockPublicAccess
integ before so I did not add the context for the FF disabled anywhere. The tests should still be working since it's not used that often. But if the team needs me to, I can add a 2nd integ with the old behaviorChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license