Upload on container with write ACL reports errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
Confirmed
|
Medium
|
Peter Tran |
Bug Description
On swift configured on devstack, I'm unable to upload object in a container where Write ACL has been set by using the swift client. Performing same operation with curl client works as expected.
Command outputs :
The container where wite ACL has been set. demo user owns the Admin role.
$ swift --os-tenant-
tat container
Account: AUTH_cbd3ac87d0
Container: container
Objects: 3
Bytes: 10724
Read ACL:
Write ACL: demo:demouser2
Sync To:
Sync Key:
Accept-Ranges: bytes
X-Timestamp: 1374660280.52319
X-Trans-Id: tx12fce7c35acb4
Content-Type: text/plain; charset=utf-8
The user demouser2 has no roles but it is allowed to PUT object in container 'container'. But two errors are return. This command should work according to the write ACL.
$ swift --os-tenant-
0/v2.0 upload container exercise.sh
Error trying to create container 'container': 403 Forbidden: <html><
Object HEAD failed: http://
If I configure the write ACL plus the read ACL the object is uploaded but an error is still returned :
$ swift --os-tenant-
ost container -r 'demo:demouser2'
$ swift --os-tenant-
0/v2.0 upload container exercise.sh
Error trying to create container 'container': 403 Forbidden: <html><
exercise.sh
$ swift --os-tenant-
ist container
exercise.sh
If I use curl to perform the same operation:
$ T=$(keystone --os-tenant-
ost:5000/v2.0 token-get | awk '/ id / {print $4}')
$ swift --os-tenant-
tat container
Account: AUTH_cbd3ac87d0
Container: container
Objects: 3
Bytes: 10724
Read ACL:
Write ACL: demo:demouser2
Sync To:
Sync Key:
Accept-Ranges: bytes
X-Timestamp: 1374660280.52319
X-Trans-Id: tx12fce7c35acb4
Content-Type: text/plain; charset=utf-8
$ curl -XGET -H "X-Auth-Token: $T" http://
rc
<html><
$ curl -i -XPUT -H "X-Auth-Token: $T" --data-binary "bouh" http://
d4bcbb477/
HTTP/1.1 201 Created
Last-Modified: Wed, 24 Jul 2013 15:06:22 GMT
Content-Length: 0
Etag: c9c5384adec41a1
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx122f5662075f4
Date: Wed, 24 Jul 2013 15:06:22 GMT
Changed in python-swiftclient: | |
assignee: | nobody → Fabien Boucher (fabien-boucher) |
status: | New → Triaged |
Changed in python-swiftclient: | |
status: | Triaged → Confirmed |
importance: | Undecided → Medium |
assignee: | Fabien Boucher (fabien-boucher) → nobody |
Changed in python-swiftclient: | |
assignee: | nobody → Peter Tran (pete-tran02) |
Peter, you might want to have a look at Thiago's patch /review. openstack. org/60400
https:/