Admin auth check seems to override policy rules.

Bug #1336418 reported by Charles V Bock
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Justin Pomeroy

Bug Description

This check for the admin role seems to fly in the face of the RBAC control that keystone now gives us.
since is_superuser is based solely on the user having the role of admin.

        if not user.is_superuser:
            raise exceptions.NotAuthorized

https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/keystone.py#L144

For instance if I give access to the list-users call for people with role "user_lister" this check effectively overrides my policy every time.

This only happens in horizon, via curl / direct API calls there is no such interference.

Thoughts?

Revision history for this message
Charles V Bock (charles-v-bock) wrote :

Re-evaluating this... will reopen if Its still an issue.

Changed in horizon:
status: New → Invalid
Revision history for this message
Charles V Bock (charles-v-bock) wrote :

Yes this does seem valid, especially with the more diverse v3 policy system.

Changed in horizon:
status: Invalid → New
Akihiro Motoki (amotoki)
tags: removed: horizon
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/133032

Changed in horizon:
assignee: nobody → Justin Pomeroy (jpomero)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/133535

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

Reviewed: https://review.openstack.org/133032
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=45ae78ce85c8ecc211c7c957c6409955588f831a
Submitter: Jenkins
Branch: master

commit 45ae78ce85c8ecc211c7c957c6409955588f831a
Author: Justin Pomeroy <email address hidden>
Date: Thu Nov 6 07:30:38 2014 -0600

    Honor keystone policy file when creating client

    When creating the keystone client for an admin the user is checked
    for the specific role of "admin" to determine if they are authorized
    to use the admin URL. This patch changes this logic so that the
    policy file is honored instead of a specific role.

    Closes-Bug: #1336418
    Change-Id: I600334dff17a5564f97cbcce67ff6d3619142961

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → kilo-1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/juno)

Change abandoned by Justin Pomeroy (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/133535

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.