Project/Volumes page do not respect policy.json value

Bug #1579111 reported by Paul Karikh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Daniel Castellanos

Bug Description

Let's assume that user/operator wants to restrict access to the Volumes page via policy.json file.
Looks like the best way to do it is to set '"volume:get_all": ["rule:context_is_admin"],' in cinder_policy.json file.
But if we do so and restart Horizon - nothing happens.
Volumes panel has following restrictions:
permissions = ('openstack.services.volume', 'openstack.services.volumev2'),

Looks like we need to add some policy checks for this panel.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

We should only block the panel when both get all and create are blocked; technically there could be a time when someone would allow creation but not listing, and we shouldn't block that regardless of obscurity.

Changed in horizon:
status: New → Confirmed
importance: Undecided → High
importance: High → Medium
milestone: none → next
summary: - Project/Volumes page do not respect polic.json value
+ Project/Volumes page do not respect policy.json value
Changed in horizon:
assignee: nobody → Daniel Castellanos (luis-daniel-castellanos)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/339110

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
David Lyle (david-lyle) wrote :

Create is not a necessary check to block page access, just listing.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/339110
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6b9dc6ac560ef68e702e405d3653ff204cb88740
Submitter: Jenkins
Branch: master

commit 6b9dc6ac560ef68e702e405d3653ff204cb88740
Author: Luis Daniel Castellanos <email address hidden>
Date: Thu Jul 7 11:06:45 2016 -0500

    Added policy checks for Project>Volumes Panel

    Before if a user/operator wanted to restrict access to the Volumes
    Panel via the policy.json file by setting these values to:
    "volume:get_all": "rule:context_is_admin"
    nothing happened after restarting horizon.
    This patch adds the policy checks so the access to the Volumes panel
    be restricted by changing the cinder_policy.json file

    Change-Id: Ibc53be505a053353062c03ea5d31e9fd800a5dcb
    Closes-Bug: #1579111

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: next → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.0.0b1

This issue was fixed in the openstack/horizon 11.0.0.0b1 development milestone.

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.