nova quota-update can update quota for a non-exist tenant

Bug #1163161 reported by diaojuan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
David Geng

Bug Description

Test procedure:

1. check the tenant of your openstack

[root@sco-svt opt]# keystone tenant-list
+----------------------------------+---------+---------+
| id | name | enabled |
+----------------------------------+---------+---------+
| 26df64cc1d2d4df4b04a8acd0f86cf15 | service | true |
| 84ca1c4ffb8d4aa9918d41e5fce642a7 | admin | true |
+----------------------------------+---------+---------+
2. run nova quota-update to update a quota for a non-exist tenant.
nova quota-update --instance 40 --cores 40 --ram 409600 --volumes 160 --floating-ips 100 diaojuan
[root@sco-svt opt]# nova quota-show diaojuan
+-----------------------------+--------+
| Property | Value |
+-----------------------------+--------+
| cores | 40 |
| floating_ips | 100 |
| gigabytes | 1000 |
| injected_file_content_bytes | 10240 |
| injected_files | 5 |
| instances | 40 |
| metadata_items | 128 |
| ram | 409600 |
| volumes | 160 |
+-----------------------------+--------+

3. Expected result: the update will failed Because diaojuan is not the exist tenant-id.

     Actual result: it can be successfully executed.

diaojuan (diaojuan)
information type: Private Security → Public Security
diaojuan (diaojuan)
Changed in python-glanceclient:
assignee: nobody → diaojuan (diaojuan)
assignee: diaojuan (diaojuan) → nobody
David Geng (genggjh)
Changed in python-glanceclient:
assignee: nobody → David Geng (genggjh)
affects: python-glanceclient → nova
Changed in nova:
assignee: David Geng (genggjh) → nobody
assignee: nobody → David Geng (genggjh)
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

this needs keystone's cooperation since the tenant_id is checked by it
however, from api to db/sqlalchemy/api.py, all the policy checkes don't send req to keystone

the quota on non-exsist tenant will not cause security problem, just cause unnecessary SQL storage

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :
Thierry Carrez (ttx)
information type: Public Security → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.