Repository navigation
Conversation
Hello tcarmet,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## bugfix/CLDSRV-1039-versioned-copy-source-authorization #6324 +/- ##
==========================================================================================
+ Coverage 85.32% 85.37% +0.04%
==========================================================================================
Files 206 206
Lines 13441 13446 +5
==========================================================================================
+ Hits 11469 11479 +10
+ Misses 1972 1967 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Is prettier required for 9.3? |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
There was a problem hiding this comment.
Audit of the copy source authorization. Issues 1, 2, 3 and 4 are inline and need fixing in this PR. All were reproduced end to end against cloudserver and a real Vault (7.89.0). Line numbers refer to this PR's branch.
The rest were already broken before this PR and have their own tickets, so nothing is needed for them here:
- CLDSRV-1026: CopyObject: authorize the ACL and tagging headers on the destination (issue 5)
- CLDSRV-1017: Multi-object delete by IAM user applies the last key's authorization verdict to all keys (issue 6, existing, fixed on 9.5 and 9.6)
- CLDSRV-1025: DeleteObjects: check the bucket policy against each key, not the bucket (issue 6)
- CLDSRV-1028: IAM tag conditions: evaluate a copy's source read against the source's tags (issue 7)
- ARSN-661: Policy evaluator: a Deny with a tag condition hides the Allow of the same policy (issue 7)
- CLDSRV-1029: PutBucketPolicy: validate every condition key, not only the first of each operator (lets issue 4's
s3:VersionIdinto a bucket policy)
|
@davidtencer this PR also fixes an older security bug that the description doesn't mention. Do you want a separate ticket for it? The bug: when a copy request named a specific version of the source object, the requester's permission to read that object was never checked. A user in the same account could copy an object they weren't allowed to read into a place they could write, then read the copy there. This worked on unversioned buckets too. It existed before CLDSRV-1021. A ticket would let us list it in the release notes and decide on backports separately. In any case, @tcarmet, could you add a line about it to the PR description? |
|
@leif-scality and @tcarmet yes please I'd like to have an S3C bug ticket created to document the bug in release notes even though 2 tickets are fixed by the same PR. |
@tcarmet I can do the ticket |
leif-scality
left a comment
There was a problem hiding this comment.
Second pass on 66872d0. Two issues, both inline:
- Issue 8 (inline on
parseCopySource.js): a repeatedversionIdinx-amz-copy-sourcecan crash the worker. Added by commit 3, so it should be fixed in this PR. - Issue 9 (inline on
objectPutCopyPart.js): UploadPartCopy ignores an IAM deny on the destination when the destination key already exists. This was already broken before this PR. It is the same bug commit 3 fixes for the source, a few lines away, so it is cheap to fix here. If you'd rather keep it out of this PR, like CLDSRV-1026, tell me and I'll open a ticket.
Line numbers refer to this PR's branch.
|
@davidtencer @tcarmet Created S3C-11581 for the versioned-copy IAM bypass (review issue 3). It also covers issue 2 (same root cause, also fixed by commit 3). Assigned to @tcarmet, linked to CLDSRV-1021 and S3C-11468. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
0e4759f to
ca2dde6
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
|
@leif-scality I split this PR into 4, so each topic can be reviewed on its own and the review is easier:
If more topics come up, I'll look at each one individually and either create another stacked PR, fix the existing ones, or open a ticket. |
CopyObject and UploadPartCopy evaluated the bucket policy for the copy source's read against the destination key instead of the source key. So a requester allowed to write to one prefix of a bucket could copy, and then read, objects under a prefix the bucket policy explicitly denies them reading. With this change, reading the copy source is authorized against the source bucket and key, the same as a direct GetObject.
Stacked on #6331, which must merge first: once the source bucket policy applies, a cross-account copy of a specific version would otherwise go through without the requester's own permission.