maas cli admin cannot get api creds for another user (must use maas-region-admin)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
i can create an admin user like:
$ sudo maas-region-admin createadmin "--username=admin" \
--<email address hidden> "--password=
creating works fine. i can then get that admin's api key with:
$ sudo maas-region-admin apikey "--username=admin"
and then start using hte maas cli, which is great, no more need for root on maas region controller.
I can create a second user using the maas cli:
$ maas admin users create username=smoser <email address hidden> password=smoser is_superuser=0
So at this point I have 1 admin user (admin) and one normal user. I have the api key for the admin user, but not the normal user.
I'd like to be able to use my api admin creds to read the apikey for the normal user.
I *can* do:
sudo maas-region-admin apikey --username=smoser
but I'd rather do:
creds=$(maas admin create-
maas login smoser http://
Seems a pain that in order to create a new user and have them start using their api, you eiterh either
a.) have to run commands as root on the region controller
b.) have the user login to the web ui
Changed in maas: | |
milestone: | none → next |
Changed in maas: | |
milestone: | next → none |
This looks like an improvement that we should do.