Skip to content

rgw: use object ARN for InitMultipart permissions#62020

Merged
adamemerson merged 1 commit intoceph:mainfrom
cbodley:wip-70191
Mar 5, 2025
Merged

rgw: use object ARN for InitMultipart permissions#62020
adamemerson merged 1 commit intoceph:mainfrom
cbodley:wip-70191

Conversation

@cbodley
Copy link
Copy Markdown
Contributor

@cbodley cbodley commented Feb 26, 2025

from https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions:

You must be allowed to perform the s3:PutObject action on an object to create a multipart upload request.

but it was calling the verify_bucket_permission() overload which defaulted to the bucket ARN. pass the object ARN instead, like we do for RGWPutObj and RGWCompleteMultipart

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

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

from https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions:
> You must be allowed to perform the s3:PutObject action on an object to create a multipart upload request.

but it was calling the verify_bucket_permission() overload which
defaulted to the bucket ARN. pass the object ARN instead, like we do for
RGWPutObj and RGWCompleteMultipart

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley cbodley requested a review from a team as a code owner February 26, 2025 21:48
@github-actions github-actions Bot added the rgw label Feb 26, 2025
@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Feb 26, 2025

test case in ceph/s3-tests#625

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Feb 26, 2025

i was concerned that this change might break existing policies that only granted permission on the bucket ARN, but such policies would reject UploadPart and CompleteMultipartUpload requests so would be broken regardless

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Feb 28, 2025

passed qa against ceph/s3-tests#625 in https://pulpito.ceph.com/cbodley-2025-02-28_00:54:32-rgw-wip-70191-distro-default-smithi/

s3tests_boto3/functional/test_s3.py::test_bucket_policy_multipart PASSED [ 80%]

@cbodley cbodley added TESTED and removed needs-qa labels Feb 28, 2025
@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Feb 28, 2025

jenkins test windows

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Feb 28, 2025

jenkins test make check arm64

1 similar comment
@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Mar 5, 2025

jenkins test make check arm64

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Mar 5, 2025

https://jenkins.ceph.com/job/ceph-pull-requests-arm64/69457/

The following tests FAILED:
7 - run-tox-mgr-dashboard-py3 (Failed)

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Mar 5, 2025

jenkins test make check arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants