Ask Your Question
0

keystone v3 project user list

asked 2014-07-23 19:18:41 -0500

cvbock gravatar image

In version 2.0 i used to be able to make this call: /v2.0/tenants/[project id]/users or simply api.keystone.user_list(request, project=project_id)

to get back a list of users in a specific project

Is this same functionality available in v3??

The same call using python keystone client in V3 returns me all the users in keystone even if I specify a project argument. and /v3/projects/[project id]/users doesn't seem to even exist.

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-24 00:08:23 -0500

updated 2014-07-24 00:45:08 -0500

Not exactly same , but v3 has

List user projects: GET /users/{user_id}/projects

You can add optional query parameters which is project_name

Also you can get a role assignment on projects which will give you users

List effective role assignments: GET /role_assignments

edit flag offensive delete link more

Comments

That's the exact opposite of what I'm looking to do! I want to list users given a project not list projects given a user. Thanks for trying though.

cvbock gravatar imagecvbock ( 2014-07-24 10:10:57 -0500 )edit

I realized that. Look at GET /role_assignment to that you can add query params.

e.g GET /role_assignment?project.id=<someid> should gve you list of role assignments which also includes user information

Haneef Ali gravatar imageHaneef Ali ( 2014-07-24 16:46:14 -0500 )edit

I don't want to make a call for every single user (hundreds or thousands) to see if they have roles on a given project, I just want to make a single call to get back a list of users who have roles on a given project.

cvbock gravatar imagecvbock ( 2014-07-24 16:57:13 -0500 )edit

GET /role_assignments with project_id as query param is a single call which will return roles assignments for all the user. This call is much more flexible, as you can get either direct role assignment or role assignment via groups

Haneef Ali gravatar imageHaneef Ali ( 2014-07-27 06:38:31 -0500 )edit

How can you accomplish this call with python api?

keanesf gravatar imagekeanesf ( 2014-10-07 15:57:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-23 19:18:41 -0500

Seen: 888 times

Last updated: Jul 24 '14