Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin user first time #439

Open
jipdroid opened this issue Feb 7, 2019 · 3 comments
Open

admin user first time #439

jipdroid opened this issue Feb 7, 2019 · 3 comments

Comments

@jipdroid
Copy link

jipdroid commented Feb 7, 2019

hi,
according documetation
"The very first time you access the admin, you’ll be given a chance to create your first admin account."
but it has not realized.
is there anyway to get it?
i cant login into admin web,even changing api-umbrella.yml with this configuration
web:
admin:
initial_superusers:
- xxxx@xxxxx.es
username_is_email: true
auth_strategies:
enabled:
- local
password_length_min: 6
password_length_max: 72

thanks in advanced

@DusanMadar
Copy link

DusanMadar commented Feb 20, 2019

I have the same problem.

Here's my api-umbrella.yml (I am using it in a Docker container which is always rebuilt):

web:
  admin:
    auth_strategies:
      enabled:
        - local
    initial_superusers:
      - admin@test.com
    username_is_email: true
    password_length_min: 6
    password_length_max: 72

What password should I use to login at localhost/admin/login?

Here's what's in the DB:

$ docker exec -it api-umbrella /bin/bash
root@96f2ef85ad19:/# /opt/api-umbrella/embedded/bin/mongo --port 14001
> use api_umbrella
switched to db api_umbrella
> db.admins.find().pretty()
{
	"_id" : "5337e5e3-73fa-42f1-bf73-fb239e4ffd59",
	"updated_at" : ISODate("2019-02-20T14:01:53Z"),
	"username" : "admin@test.com",
	"authentication_token" : "3f6QQTZ6qtZ6eCuH61gcVlll87pA9u9jdjuh3juQ",
	"registration_source" : "seed",
	"created_at" : ISODate("2019-02-20T14:01:53Z"),
	"superuser" : true
}
> 

@science695
Copy link

Comment out the initial_superusers section, and it will ask you to create an admin account

@mloskot
Copy link

mloskot commented Sep 24, 2020

@DusanMadar

What password should I use to login at localhost/admin/login?

This is a good question and I'm also failing to find the answer and no, @science695's comment is not helpful as it applies to different setting up workflow.

Closest I've found is from #368 (comment)

Alternatively, you can also create other initial admin accounts using the web.admin.initial_superusers configuration.
Then you can use the email password reset functionality to set a new password.


Interestingly, the authentication_token is present, so I'd expect to be able to issue the REST API request to (re)set the password, but it requires two things:

  1. Your API key via one of the supported methods.
  2. AND an admin token via the X-Admin-Auth-Token header.

and the 1. seems missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants