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

rgw: compatibility issues on BucketPublicAccessBlock #55652

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

clwluvw
Copy link
Contributor

@clwluvw clwluvw commented Feb 19, 2024

  • From the AWS doc (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) the root element on GetPublicAccessBlock should be PublicAccessBlockConfiguration.
  • s3GetBucketPublicAccessBlock needs to be checked for RGWGetBucketPublicAccessBlock operation on verify_permission.
  • Return 404 when there is no public access block on the bucket.
  • Return 204 on bucket public access block deletion

Fixes: https://tracker.ceph.com/issues/64492

@clwluvw clwluvw requested a review from a team as a code owner February 19, 2024 17:29
@github-actions github-actions bot added the rgw label Feb 19, 2024
@cbodley
Copy link
Contributor

cbodley commented Feb 19, 2024

do any s3test cases need to be updated? it would be nice to add test coverage for these changed behaviors

Return 404 when there is no public access block on the bucket.

you're sure that aws returns this specific "NoSuchPublicAccessBlockConfiguration" error for buckets that haven't set one? i didn't see that listed in https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

@clwluvw
Copy link
Contributor Author

clwluvw commented Feb 19, 2024

you're sure that aws returns this specific "NoSuchPublicAccessBlockConfiguration" error for buckets that haven't set one? i didn't see that listed in https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

Yes, it was confusing for me as well but seems in practice it is. Also here is another reference to it: boto/boto3#3627

I'll add s3 tests for the coverage.

clwluvw added a commit to clwluvw/s3-tests that referenced this pull request Feb 19, 2024
Make sure NoSuchPublicAccessBlockConfiguration is returned when no public block is configured on bucket:

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
clwluvw added a commit to clwluvw/s3-tests that referenced this pull request Feb 19, 2024
Make sure 403 is returned when access is denied via s3:GetBucketPublicAccessBlock action on GetBucketPublicAccessBlock

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
@clwluvw
Copy link
Contributor Author

clwluvw commented Feb 19, 2024

@cbodley Please take a look at this: ceph/s3-tests#551

clwluvw added a commit to clwluvw/s3-tests that referenced this pull request Feb 20, 2024
Make sure NoSuchPublicAccessBlockConfiguration is returned when no public block is configured on bucket:

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
clwluvw added a commit to clwluvw/s3-tests that referenced this pull request Feb 20, 2024
Make sure 403 is returned when access is denied via s3:GetBucketPublicAccessBlock action on GetBucketPublicAccessBlock

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
From the AWS doc (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) it needs to be PublicAccessBlockConfiguration.

Fixes: https://tracker.ceph.com/issues/64492
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
s3GetBucketPublicAccessBlock needs to be checked for RGWGetBucketPublicAccessBlock operation.

Fixes: https://tracker.ceph.com/issues/64492
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Return 404 when there is no public access block on the bucket.

Fixes: https://tracker.ceph.com/issues/64492
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
@cbodley
Copy link
Contributor

cbodley commented Feb 28, 2024

jenkins test this please

@cbodley cbodley merged commit 639d182 into ceph:main Mar 7, 2024
12 checks passed
cbodley pushed a commit to ceph/s3-tests that referenced this pull request Mar 8, 2024
Make sure NoSuchPublicAccessBlockConfiguration is returned when no public block is configured on bucket:

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3056e6d)
cbodley pushed a commit to ceph/s3-tests that referenced this pull request Mar 8, 2024
Make sure 403 is returned when access is denied via s3:GetBucketPublicAccessBlock action on GetBucketPublicAccessBlock

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3af4231)
cbodley pushed a commit to ceph/s3-tests that referenced this pull request Mar 8, 2024
Make sure NoSuchPublicAccessBlockConfiguration is returned when no public block is configured on bucket:

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3056e6d)
cbodley pushed a commit to ceph/s3-tests that referenced this pull request Mar 8, 2024
Make sure 403 is returned when access is denied via s3:GetBucketPublicAccessBlock action on GetBucketPublicAccessBlock

Refs: ceph/ceph#55652
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 3af4231)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants