Project

General

Profile

Actions

Bug #42825

closed

partial copy problem

Added by Xinying Song over 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When a user in a non-default tenant specify x-amz-copy-source=<bucket>/<object>, the source object will always be fetched from the bucket under default tenant without checking permissions.

For example, create two users as follows:
```
radosgw-admin user create --uid='test1' --display-name='test1-under-default-tenant' --access-key=test1 --secret=test1
radosgw-admin user create --uid='test2' --display-name='test2-under-test2-tenant' --access-key=test2 --secret=test2
```
User test1 creates bucket test1bucket, and puts an object named test.
User test2 creates bucket test2bucket.
Now user test2 can copy the test object under test1bucket to its own bucket, which shouldn't be allowed.

curl's output like this:

PUT /test2bucket/copytest HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:7480
Accept: */*
Date: Fri, 15 Nov 2019 02:03:57 +0000
Content-Type: application/xml
Content-Length: 0
Authorization: AWS test2:OvMKLJtn3CuW48SrUZriAyaS9os=
x-amz-copy-source: test1bucket/test
x-amz-copy-source-range: bytes=0-4

< HTTP/1.1 200 OK
< x-amz-request-id: tx0000000000000000000e7-005dce078d-103e-default
< Content-Type: application/xml
< Content-Length: 217
< Date: Fri, 15 Nov 2019 02:03:57 GMT
<

Actions

Also available in: Atom PDF