nova list --host=<> silently ignored if not admin

Bug #1052347 reported by Gavin B

This bug report was converted into a question: question #235622: nova list --host=<> silently ignored if not admin.

10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Subashini Soundararajan

Bug Description

nova list --host=<name> is treated like a simple nova list if the user is not an admin, i.e. the --host=<name> filter is silently ignored.

Should there not be an insufficient-privileges error message in this case ? Otherwise there is room for confusion.

Revision history for this message
Andrew Laski (alaski) wrote :

Novaclient has no way of determining whether or not the privileges are sufficient, since that's determined by the policy configuration on the API side. So this is not something that can be addressed on the client side unless the API exposes the information necessary to do it.

affects: python-novaclient → nova
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Changed in nova:
assignee: nobody → Subashini Soundararajan (subashini-rajan17)
Revision history for this message
Subashini Soundararajan (subashini-rajan17) wrote :

Hi Gavin B,

I was looking at the nova api code that returns the list of servers to nova client. It appears that ignoring the host parameter when the user is not admin is by design. According to the current implementation when there is any parameter not applicable to a non-admin user, it is removed and the rest of the command options are processed. I'll try to bring this to notice to a reviewer/approver.

Thanks,
Subashini

Revision history for this message
Subashini Soundararajan (subashini-rajan17) wrote :

This is the commit which removes all the parameters not applicable to a non-admin user
https://github.com/openstack/nova/commit/5b866f3ad18d497d39a35248c2b0fdb62fcfaa81

Revision history for this message
Subashini Soundararajan (subashini-rajan17) wrote :

To validate the bug

Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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