Skip to content

Commit

Permalink
update auth docu
Browse files Browse the repository at this point in the history
  • Loading branch information
bitnik committed Nov 12, 2018
1 parent 6b139b4 commit 898c5f5
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions doc/authentication.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Enabling Authentication
=======================

By default BinderHub runs without authentication.
For each launch, BinderHub creates a temporary user and starts a server for that user.
By default BinderHub runs without authentication and
for each launch it creates a temporary user and starts a server for that user.

In order to enable authentication, you need to add the following into BinderHub configuration:

Expand All @@ -21,6 +21,7 @@ In order to enable authentication, you need to add the following into BinderHub
binder:
#url: "http://<external ip of binder service>"
oauth_client_id: "binder-oauth-client-test"
oauth_redirect_uri: ??
auth: {}
Expand All @@ -40,7 +41,7 @@ BinderHub starts notebook servers with `jupyter-notebook` command by default.
When authentication is not enable, this is good because users don't need to have interaction with hub and
notebook servers need to be independent of hub.
When authentication is enabled with the configuration above, users can still launch binder sessions
under `/services/binder/`, but because notebook server is independent from hub there will be some problems:
under `/services/binder/` but because notebook server is independent from hub there will be some problems:

- Logout button in Notebook UI won't logout user from hub
- User won't be able to manage notebook server with hub home actions
Expand Down Expand Up @@ -70,11 +71,11 @@ Add the following configuration to make notebook servers aware of hub:
`jupyterhub-singleuser` requires `JupyterHub` installed in user server images,
which is not installed by `repo2docker` by default.

Authentication with named servers:
----------------------------------
Authentication with named servers
---------------------------------

With above configuration Binderhub limits each authenticated user to start one server at a time.
When user already has a running server, BinderHub returns an error.
When user already has a running server, BinderHub displays an error message.

If you want to have users be able to launch multiple servers, you have to enable named servers
on JupyterHub:
Expand All @@ -85,15 +86,8 @@ on JupyterHub:
hub:
allowNamedServers: true
.. https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
.. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
.. TODO try again and see the exact error
.. warning::
Kubernetes has 63?253 char limit for pod and pvc names.

c.KubeSpawner.pod_name_template = 'jupyter-{userid}{servername}

pvcNameTemplate: claim-{userid}{servername}
.. note::
BinderHub assigns a unique name to each server with max 40 characters.

volumeNameTemplate: volume-{userid}{servername}
.. https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
.. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

0 comments on commit 898c5f5

Please sign in to comment.