Repository navigation
rgw/s3: honor object lock fields in POST object and validate CopyObject - #73214
jzhu116-bloomberg wants to merge 3 commits into
Conversation
a6c286b to
4089ebe
Compare
|
treating POST just as PUT for object lock sounds fine to me. related, but doesn't have to block this PR, I noticed that AWS requires s3:PutObjectRetention or s3:PutObjectLegalHold in addition to s3:PutObject when those headers are set. that is under Object operations and permissions for PutObject, CopyObject and CreateMultipartUpload. but it looks like RGW only enforces those actions on the dedicated PutObjRetention and PutObjLegalHold api's. cc @cbodley |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Thanks Shilpa for the review! The s3:PutObjectRetention / s3:PutObjectLegalHold requirement for PutObject, CopyObject and CreateMultipartUpload is tracked separately and fixed in #73508 . |
4089ebe to
26472d0
Compare
|
rebased |
|
This PR has been added to wip-anrao8-testing-2026-11-13-0837-main. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
This PR has been removed from wip-anrao8-testing-2026-11-13-0838-main. |
Signed-off-by: Jane Zhu <[email protected]>
Signed-off-by: Jane Zhu <[email protected]>
…bucket() can properly deletes the version Signed-off-by: Jane Zhu <[email protected]>
26472d0 to
7a36385
Compare
|
|
This PR has been added to wip-anrao14-testing-2026-12-02-0603-main. |
|
jenkins test make check arm64 |
On a bucket with object lock enabled, POST object (browser-based upload) ignores the
x-amz-object-lock-mode,x-amz-object-lock-retain-until-dateandx-amz-object-lock-legal-holdform fields. The object is stored with only the bucket's default retention, or with no protection at all if the bucket has no default, and the request still returns 204. A client that asks for a retention period or a legal hold gets an object with no or wrong protection silently.AWS does not document object lock fields for POST object, however, RGW accepts the same values as headers on PutObject, CopyObject and CreateMultipartUpload. This PR changes the POST object behavior to match with what PutObject, CopyObject and CreateMultipartUpload do.
This PR moves the object lock header parsing for PutObject, CopyObject, CreateMultipartUpload and POST object into a shared helper. CopyObject then gets the same InvalidRequest check as PutObject and CreateMultipartUpload when copying to an unlocked bucket with object lock headers.
Fixes: https://tracker.ceph.com/issues/82248
Signed-off-by: Jane Zhu [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.