A user is able to remove his/her own Account Quota
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Medium
|
Jon Snitow Solera |
Bug Description
On a standard devstack account, I want to put an account quota on the user demo (tenant_id = c5ed34278aea420
$admin_token and $demo_token are retrieved in advance.
# I use the ResellerAdmin account to set a Bytes Quota on the account
$ curl -i -X POST -H "X-Auth-Token: $admin_token" -H "X-Account-
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txdfb060b872614
Date: Tue, 23 Jul 2013 13:28:15 GMT
# I check that the quota has been set correctly
$ source demorc # get the demo credentials
$ swift stat
Account: AUTH_c5ed34278a
Containers: 0
Objects: 0
Bytes: 0
Meta Quota-Bytes: 20
X-Timestamp: 1374586095.80445
X-Trans-Id: tx95f304c793a44
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
# Using the a token of the demo (non-priviledged) account, I can remove the quota metadata on the demo account
$ curl -i -X POST -H "X-Auth-Token: $demo_token" -H "X-Remove-
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx08ba4bea795b4
Date: Tue, 23 Jul 2013 13:29:30 GMT
# I check, the quota has been removed.
$ swift stat
Account: AUTH_c5ed34278a
Containers: 0
Objects: 0
Bytes: 0
Accept-Ranges: bytes
X-Timestamp: 1374586095.80445
X-Trans-Id: txf66ff7b4a6184
Content-Type: text/plain; charset=utf-8
Changed in swift: | |
status: | New → Confirmed |
Changed in swift: | |
assignee: | nobody → Samuel Merritt (torgomatic) |
Changed in swift: | |
importance: | Undecided → Medium |
Changed in swift: | |
milestone: | none → 1.9.1 |
status: | Fix Committed → Fix Released |
Hi Joe,
It's seem there are two way to remove a metadata in swift by using X-Remove-* stuff or by using X-Account-Meta- stuff with an empty value. The reason there two way seems to be due to cURL. docs.openstack. org/api/ openstack- object- storage/ 1.0/content/ delete- account- metadata. html
Have a look here :
http://
Please can you try to remove that meta with the common way (without X-Remove) and validate you cannot remove the meta as
regular user.
Beside of that, after looking at the middleware code, it seems the middleware does not handle X-Remove but it should.