No project description provided
Project description
Jupyterhub Remote-User Authenticator
Authenticate to Jupyterhub using an authenticating proxy that can set the Remote-User header. Also supports for passing additional information to the jupyter user. This includes a Mount header.
Installation
Installation from pypi:
pip install jhub-authenticators
Installation from local git repository:
cd jhub-authenticators pip install .
Configuration
You should edit your jupyterhub_config.py config file to set the authenticator class:
c.JupyterHub.authenticator_class = 'jhub-authenticators.RemoteUserAuthenticator'
You should be able to start jupyterhub. The “/login” resource will look for the authenticated user name in the HTTP header “Remote-User”. If found, and not blank, you will be logged in as that user.
Alternatively, you can use RemoteUserLocalAuthenticator:
c.JupyterHub.authenticator_class = 'jhub-authenticators.RemoteUserLocalAuthenticator'
This provides the same authentication functionality but is derived from LocalAuthenticator and therefore provides features such as the ability to add local accounts through the admin interface if configured to do so.
Remote User Authentication extended with Mount capability
Provides the capability to supply the jupyterhub user with a set of ssh keys that can later be used to mount that particular user’s homedrive, the extended authenticator can be activated by setting the following option in the jupyterhub config file:
c.JupyterHub.authenticator_class = 'jhub-authenticators.MountRemoteUserAuthenticator'
This adds two base request paths to the jupyterhub web application:
'/login' -> requires a non empty Remote-User header '/mount' -> requires both a non empty Remote-User and Mount header
The expected format of the Mount header is that the passed string can be evaluated to a python dictionary via:
try: mount_header_dict = literal_eval(mount_header)
The internal format of the Mount header is not evaluated, this is dependent on the underlying mount implementation and should be verified there.
Note:
Upon successful parsing of the header, the active jupyterhub user instance is appended with a ‘mount’ property that contains the accepted dictionary header.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jhub-authenticators-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a986bf2c65aa2c39433f6e1f3aa83c91447e56c0778dd11034545efc850ad347 |
|
MD5 | f66bf6cee987d98c83d6ae173a2c21ba |
|
BLAKE2b-256 | f18cea467cb2ec65555a6b98eb45a7facfa1b127fe2b1447666ca75acbe2c1f1 |
Hashes for jhub_authenticators-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e316b16e6ff3f3af77f21c308e5294525f113d15074b089cb7308c82f33bd7de |
|
MD5 | 7e7bdc11c90725873138dc3deab53f2b |
|
BLAKE2b-256 | ecded9dd3368be134a7c2ffe96e0cfcf0c8c8cf401d569df123f738e676c9c00 |