7676kernelci-api | INFO: 172.20.0.1:49228 - "GET / HTTP/1.1" 200 OK
7777```
7878
79- ### Create an admin user account
79+ ### Bootstrap the initial admin user
8080
8181Some parts of the API don't require any authentication, like in the example
8282above with the root ` / ` endpoint and most ` GET ` requests to retrieve data.
@@ -85,7 +85,7 @@ by authenticated users. This will be required to run a full pipeline or to
8585subscribe to the pub/sub interface. Then some users have administrator rights,
8686which enables them to create new user accounts.
8787
88- On startup, the API now bootstraps the first admin account automatically if no
88+ On startup, the API bootstraps the first admin account automatically if no
8989admin exists yet:
9090
9191* ` KCI_INITIAL_PASSWORD ` must be set, otherwise startup fails with an error
@@ -97,29 +97,14 @@ admin exists yet:
9797After the first admin exists, ` KCI_INITIAL_PASSWORD ` is no longer required for
9898startup.
9999
100- You can still create an admin manually with the
101- [ ` api.admin ` ] ( https://github.com/kernelci/kernelci-api/blob/main/api/admin.py )
102- tool (wrapper: ` setup_admin_user ` ), for example:
103-
104- ```
105- $ ./scripts/setup_admin_user --email EMAIL
106- Creating kernelci-api_api_run ... done
107- Password for user 'admin':
108- Creating admin user...
109- ```
110-
111- > ** Note** Strictly speaking, only the ` db ` service needs to be running in
112- > order to use this tool. In fact it can also be used with any other MongoDB
113- > instance such as an Atlas account using the ` --mongo ` command line argument.
114-
115100> ** Note** For more details about how to create users via the raw API, see the
116101> [ API documentation] ( ../api-details/#users )
117102
118103### Create an admin API token
119104
120- Then to get an API token, the ` /user/login ` API endpoint can be used. For example,
121- to create an admin token with the same user name and password as used
122- previously :
105+ Then to get an API token, the ` /user/login ` API endpoint can be used. For
106+ example, to create an admin token with the same username and password set in
107+ ` KCI_INITIAL_PASSWORD ` :
123108
124109```
125110$ curl -X 'POST' \
0 commit comments