Ask Your Question
0

Show user ID in OpenStack CLI for unprivileged user

asked 2020-01-28 03:11:58 -0500

panticz gravatar image

updated 2020-01-28 03:19:35 -0500

How can a unprivileged user show his user ID in OpenStack CLI?

Im able to show my project

# openstack project list
+----------------------------------+----------------------------------+
| ID                               | Name                             |
+----------------------------------+----------------------------------+
| 0f0727cadb5843e5990ca6b8ac1457bd | foo                              |
+----------------------------------+----------------------------------+

but not the user

# openstack user list 
You are not authorized to perform the requested action: identity:list_users. (HTTP 403) (Request-ID: req-644f56f2-ea5c-4ac4-aea1-3d9cbbc4303d)
edit retag flag offensive close merge delete

Comments

I can confirm that a unprivileged user can see his user id if he know his user name:

 openstack user show foo
panticz gravatar imagepanticz ( 2020-01-30 02:35:22 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2020-01-29 18:35:12 -0500

updated 2020-01-29 18:35:55 -0500

I currently don't have an OpenStack installation for testing this, but I am surprised that project list works for an unprivileged user.

To see the user ID, try openstack user show USERNAME.

If nothing helps, and if you have access to a controller, you can still tweak the policy

edit flag offensive delete link more
0

answered 2020-01-30 00:07:47 -0500

updated 2020-01-30 00:18:54 -0500

Sometime tenant need to see details about own project to get VIM access, Its absolutely fine. You can able to see project "foo" because foo is tenant which you are using. It wont give you update access, only read access openstack project list gives output for only current project not all project unless you are admin.

openstack user list >> only admin given privileged

[root@PIYUSH]# source tenant.rc [root@PIYUSH]# openstack project list +----------------------------------+---------+ | ID | Name | +----------------------------------+---------+ | 3da8bd0f24ed48bbbfd081d8b3fbc0a7 | tenant | +----------------------------------+---------+

[root@PIYUSH]# source admin.rc > with admin you able to see tenant [root@PIYUSH# openstack project list +----------------------------------+------------------------------------------------------------------+ | ID | Name | +----------------------------------+------------------------------------------------------------------+ | 172f112aa8174e23acdb4ec9cb96e36b | 90dd7a084fb84cf4b8a8a0edf9e4220a-fe3e7a39-6909-4920-baf2-d236396 | | 27e48659b34e4ccc8835bedf3654ce9c | 3da8bd0f24ed48bbbfd081d8b3fbc0a7-a8651281-22b3-41ce-add0-2539fc8 | | 3da8bd0f24ed48bbbfd081d8b3fbc0a7 | tenant | | 4ed6c4cfbfda403cb9acd28284d96f57 | e68c458a95764aeca8ea6a598956e630-34f8946b-17d6-4329-acfe-6d29d85 | | 4fea63e6b255486da5456b0683341a9a | e68c458a95764aeca8ea6a598956e630-c1bed337-f25b-475f-bfff-048ab8c | | 532e5d7157244a3ab5f206a97e6c6643 | 90dd7a084fb84cf4b8a8a0edf9e4220a-0ff3ae1d-77c0-4aa5-9301-f44376e | | +----------------------------------+------------------------------------------------------------------+

edit flag offensive delete link more

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: 2020-01-28 03:11:58 -0500

Seen: 92 times

Last updated: Jan 30