maas cli admin cannot get api creds for another user (must use maas-region-admin)

Bug #1433627 reported by Scott Moser
6
This bug affects 1 person
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=passw0rd"

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-authorisation-token --username=smoser)
  maas login smoser http://maas/MAAS/1.0 $creds

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

Revision history for this message
LaMont Jones (lamont) wrote :

This looks like an improvement that we should do.

Changed in maas:
importance: Undecided → Wishlist
status: New → Triaged
Changed in maas:
milestone: none → next
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
Changed in maas:
milestone: next → none
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.