context_is_admin policy can only take roles rules

Bug #1118142 reported by Wenhao Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Wenhao Xu

Bug Description

branch: master
commit: ee955d272ab4eef2e8371f2e460454058ce7e46c

context_is_admin role is used by nova to check if the current user is the admin. But it can only take roles rules.

So a generic rule doesn't work:
   "context_is_admin": "user_name:%(project_name)s"

It can only accept rules like this:
   "context_is_admin": "role:admin or role:nova-admin"

Wenhao Xu (wenhao-x)
description: updated
Wenhao Xu (wenhao-x)
Changed in nova:
assignee: nobody → Wenhao Xu (wenhao-x)
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/21417
Committed: http://github.com/openstack/nova/commit/1d07c12ecad0ace2caae7baecd9f0f669b62cc35
Submitter: Jenkins
Branch: master

commit 1d07c12ecad0ace2caae7baecd9f0f669b62cc35
Author: Wenhao Xu <email address hidden>
Date: Thu Feb 7 17:18:12 2013 +0800

    Allow generic rules in context_is_admin rule in policy.

    context_is_admin role is used by nova to check if
    the current user is the admin. But it can only check
    role rules. The fix allow generic rules in context_is_admin.

    DocImpact

    Fixes bug 1118142

    Change-Id: Ib4823a67fe63d5356fc8c9280a2013b8855f5217

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.