reanahub / reana-server

REANA API server
http://reana-server.readthedocs.io/
MIT License
5 stars 37 forks source link

docs: token procedures #57

Closed diegodelemos closed 6 years ago

diegodelemos commented 6 years ago

After the addition of the user tokens, documentation needs to be updated to show how to get a token and how to use them.

tiborsimko commented 6 years ago

The admin account comes first, because it cannot be done over REST API.

FWIW I'm using the following one-liner to set the token:

$ export REANA_ACCESS_TOKEN=$(kubectl logs -l app=server | grep access_token: | awk '{print $NF;}' | tr -d '[:space:]')

It would be nicer to have something more CLI friendly like: (see also manual DB creation https://github.com/reanahub/reana-cluster/issues/104)

$ reana-cluster db create
$ reana-cluster users create -e admin@example.org -r admin
$ eval $(reana-cluster env) # this will also generate proper REANA_ACCESS_TOKEN=... 

for managing admins.

For managing regular users, it would be nice to have a user import/export facility, so that we one could do things like:

dev> reana-cluster users export > myusers.csv
qa> reana-cluster users import < myusers.csv  

We can think of an appropriate script name and the hosting repository (reana-cluster, reana-admin, ...) and ticketise these separately.

diegodelemos commented 6 years ago

It would be nicer to have something more CLI friendly like: (see also manual DB creation >https://github.com/reanahub/reana-cluster/issues/104)

$ reana-cluster db create
$ reana-cluster users create -e admin@example.org -r admin
$ eval $(reana-cluster env) # this will also generate proper REANA_ACCESS_TOKEN=... 

Addressed in https://github.com/reanahub/reana-cluster/pull/108 with --all flag.