diff --git a/examples/service-whoami-flask/README.md b/examples/service-whoami-flask/README.md index e236c5cd31..754dcad481 100644 --- a/examples/service-whoami-flask/README.md +++ b/examples/service-whoami-flask/README.md @@ -27,7 +27,7 @@ After logging in with your local-system credentials, you should see a JSON dump } ``` -This relies on the Hub starting the whoami service, via config (see [jupyterhub_config.py](./jupyterhub_config.py)). For ordinary users to access this service, they need to be given the appropriate scope (again, see [jupyterhub_config.py](./jupyterhub_config.py)). +This relies on the Hub starting the whoami service, via config (see [jupyterhub_config.py](./jupyterhub_config.py)). For ordinary users to access this service, they need to be given the appropriate scope (again, see [jupyterhub_config.py](./jupyterhub_config.py)). A similar service could be run externally, by setting the JupyterHub service environment variables: diff --git a/examples/service-whoami-flask/jupyterhub_config.py b/examples/service-whoami-flask/jupyterhub_config.py index 91d15c3710..8ed30f4886 100644 --- a/examples/service-whoami-flask/jupyterhub_config.py +++ b/examples/service-whoami-flask/jupyterhub_config.py @@ -7,7 +7,13 @@ }, ] c.JupyterHub.load_roles = [ - {'name': 'user', 'scopes': ['access:services!service=whoami', 'self']} + { + 'name': 'user', + 'scopes': [ + 'access:services!service=whoami', # access this service + 'self', # and all of the standard things for a user + ], + } ] # dummy auth and simple spawner for testing