- Ensures add_user is called as part of startup *for all users*.
This was previously only true for users not already in the db.
- Normalize usernames in whitelist and admin sets
- Call add_user on new users logged in when there is no whitelist.
If a user, alice, requests /user/bob/notebooks/mynotebook.ipynb,
redirect her to /user/alice/notebooks/mynotebook.ipynb.
Currently, such requests get stuck in a redirect loop because
the request will be redirected to login page with a next parameter
that when followed is again redirected.
When notebook_dir is consistent across users, this will allow
users to share notebook URLs. Fixes#424.
relies on CHP's host-based routing (a feature I didn't add!)
requires wildcard DNS and wildcard SSL for a proper setup
still lots to workout and cleanup in terms of cookies and where to use host, domain, path, but it works locally.
moves `spawn_pending` flag to only around start, not the HTTP wait.
Some Spawners may not know how to poll until start has finished (DockerSpawner).
Let's not require that they do.
Handlers call `get_authenticated_user`, which in turn calls
- authenticate
- normalize_username
- check_whitelist
get_authenticated_user shouldn't need to be overridden.
Normalization can be handled via overriding normalize_username.
If Spawner.options_form is specified, a form providing input controls is shown to the user prior to launch.
Spawners access the result via the `self.user_options` dict.
The default spawners offer no form.
Server started, but never became accessible:
> Failed to reach your server.
> Please try again later.
> Contact admin if the issue persists.
Server failed to start (errors in Spawner):
> Failed to start your server.
> Please contact admin.
user.stop clears user.server, which proxy.delete_user uses
scheduling user.stop first creates a race where user.server is None when it's removed from the proxy.
e.g. docker, which can take a long time to stop,
especially if several docker actions are already queued.
Use status `202: Accepted` for API replies sent with spawn/stop still pending
optionally allow admin users to login to user servers by visiting a special admin-only URL that sets the relevant cookie
- disabled by default
- an 'access server' button is added to the admin panel, which sets the necessary cookie to log in to the user server
such as VMs, batch and cloud services, etc. which can take minutes to start.
- Spawner.start_timeout sets a limit for true failure,
at which point spawner should be considered dead.
- Handler.spawn_single_user only waits up to 10 seconds
before returning. It can now return with a spawner still pending.
- Record User.spawn_pending state, and render 'pending' page
while server is starting but not started.