yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #82079
[Bug 1869396] [NEW] os-ips API policy is allowed for everyone even policy defaults is admin_or_owner
Public bug reported:
os-ips API policy is default to admin_or_owner[1] but API is allowed for
everyone.
We can see the test trying with other project context can access the API
- https://review.opendev.org/#/c/715477/
This is because API does not pass the server project_id in policy target
- https://github.com/openstack/nova/blob/96f6622316993fb41f4c5f37852d4c879c9716a5/nova/api/openstack/compute/ips.py#L41
and if no target is passed then, policy.py add the default targets which is nothing but context.project_id (allow for everyone try to access)
- https://github.com/openstack/nova/blob/c16315165ce307c605cf4b608b2df3aa06f46982/nova/policy.py#L191
[1]
- https://github.com/openstack/nova/blob/eaf08c0b7b8250408e5d10c6471f2e3155cc0edb/nova/policies/ips.py#L27
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1869396
Title:
os-ips API policy is allowed for everyone even policy defaults is
admin_or_owner
Status in OpenStack Compute (nova):
New
Bug description:
os-ips API policy is default to admin_or_owner[1] but API is allowed
for everyone.
We can see the test trying with other project context can access the API
- https://review.opendev.org/#/c/715477/
This is because API does not pass the server project_id in policy target
- https://github.com/openstack/nova/blob/96f6622316993fb41f4c5f37852d4c879c9716a5/nova/api/openstack/compute/ips.py#L41
and if no target is passed then, policy.py add the default targets which is nothing but context.project_id (allow for everyone try to access)
- https://github.com/openstack/nova/blob/c16315165ce307c605cf4b608b2df3aa06f46982/nova/policy.py#L191
[1]
- https://github.com/openstack/nova/blob/eaf08c0b7b8250408e5d10c6471f2e3155cc0edb/nova/policies/ips.py#L27
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1869396/+subscriptions
Follow ups