Expose effective role assignments in client & CLI v3

Bug #1246310 reported by Andreas Jaeger
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Wishlist
Rodrigo Duarte
python-openstackclient
Fix Released
Medium
Henrique Truta

Bug Description

The keystone client gives me with user-role-list the roles a single user has in one tenant - but there's no way to get a list of all tenants the user has a role in it.

Revision history for this message
Dolph Mathews (dolph) wrote :

This is available in the API via GET /v3/role_assignments -- but I don't see that functionality exposed in the client library (if so, it's definitely not available via OSC).

no longer affects: keystone
Changed in python-keystoneclient:
importance: Undecided → Wishlist
status: New → Triaged
summary: - No way to figure out list of tenants a user belongs to
+ Expose effective role assignments in client & CLI
Dean Troyer (dtroyer)
Changed in python-openstackclient:
importance: Undecided → Medium
status: New → Confirmed
Terry Howe (thowe-g)
Changed in python-openstackclient:
assignee: nobody → Terry Howe (thowe-g)
status: Confirmed → In Progress
Revision history for this message
Terry Howe (thowe-g) wrote :

v3 just isn't working for me, abandoning the effort for now.

summary: - Expose effective role assignments in client & CLI
+ Expose effective role assignments in client & CLI v3
Changed in python-openstackclient:
assignee: Terry Howe (thowe-g) → nobody
status: In Progress → Confirmed
Revision history for this message
Dolph Mathews (dolph) wrote :

Terry: ping us in #openstack-keystone if you need a hand

Revision history for this message
Rodrigo Duarte (rodrigodsousa) wrote :

Hello there, in order to fix bug #1278920 we need to address this one. After taking a look at the current commands, we decided to create the following:

Positional argument: role-assignment-list with subcommands --tenant (and --tennant-id), --user (and --user-id) and --effective (see /role_assignments at http://api.openstack.org/api-ref-identity.html#Role_Calls).

To accomplish that, we'd need to create a new Resource and Manager (inheriting from base.CrudManager implementing only the list() method) classes at the keystoneclient project (in the /keystoneclient/v3/assignments.py file). In this way, the Python client call would be api.keystone.assignments.list().

Makes sense?

Revision history for this message
Steve Martinelli (stevemar) wrote :

@Rodrigo, that makes sense to me, and I think it warrants a blueprint for keystoneclient.

Changed in python-keystoneclient:
assignee: nobody → Rodrigo Duarte (rodrigodsousa)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Related fix proposed to python-keystoneclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/91578

Changed in python-keystoneclient:
status: Triaged → In Progress
Changed in python-openstackclient:
assignee: nobody → Henrique Truta (henrique-4)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/91578
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=0b0d2d3a9a909fcd00b1fda777201bd7c4608978
Submitter: Jenkins
Branch: master

commit 0b0d2d3a9a909fcd00b1fda777201bd7c4608978
Author: Rodrigo Duarte Sousa <email address hidden>
Date: Thu May 1 11:07:59 2014 -0300

    Add /role_assignments endpoint support

    This patch adds role assignments list support
    to keystoneclient.

    Created RoleAssignment resource and RoleAssignmentManager
    classes. RoleAssignmentManager only implements the list()
    method, the other inherited methods from base.CrudManager
    raises a MethodNotImplemented error with customized messages.

    This bp is complimented with the OSC part:
    https://blueprints.launchpad.net/python-openstackclient/+spec/roles-assignment-list

    Change-Id: I164b58b67ff42320238e943ddfa9d0a8aadd0a6d
    Implements: blueprint roles-assignment-support
    Closes-Bug: #1246310

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Changed in python-openstackclient:
status: Confirmed → In Progress
Dolph Mathews (dolph)
Changed in python-keystoneclient:
milestone: none → 0.9.0
Dolph Mathews (dolph)
Changed in python-keystoneclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/91634
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=58f80e4c7544c0ee064c1629b3f128a628fc71d8
Submitter: Jenkins
Branch: master

commit 58f80e4c7544c0ee064c1629b3f128a628fc71d8
Author: henriquetruta <email address hidden>
Date: Wed May 28 11:09:46 2014 -0300

    Add role assignments list support to identity v3

    The assignments manager and its test class were created.
    Some fake stubs were also added on the fakes.py module.

    The "openstack role assignment list" command was created.

    Change-Id: Iae94f4fee608ea3e09ff38961ad22edc38efb89c
    Implements: blueprint roles-assignment-list
    Closes-Bug: 1246310

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in python-openstackclient:
milestone: none → m4
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
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.