Jupyterhub Authenticators
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 list of user defined /data headers.
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 = 'jhubauthenticators.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 = 'jhubauthenticators.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.
Dummy Authentication
Provides an option for testing JupyterHub authentication with a dummy authenticator that can have a global preset password for any account:
c.JupyterHub.authenticator_class = 'jhubauthenticators.DummyAuthenticator' c.DummyAuthenticator.password = 'password'
Note! Don’t use in production.
Remote User Authentication extended with user-defined headers
Provides the capability to supply the jupyterhub user with additional state information via the /data path. This adds two base request paths to the jupyterhub web application:
'/login' -> requires a non empty Remote-User header '/data' -> requires both an authenticated request and a valid configured header
Before information can be passed to the user via the ‘/data’ path, a list of valid headers is required. These preset valid headers are then upon a POST request to the ‘/data’ URl appended to the current authenticated jupyterhub user data dictionary. I.e. user.data[Header] = HeaderValue
The extended authenticator can be activated by setting the following option in the jupyterhub config file:
c.JupyterHub.authenticator_class = 'jhubauthenticators.DataRemoteUserAuthenticator' # Making 'State' a valid header to pass to /data c.DataRemoteUserAuthenticator.data_headers = ['State']
Beyond providing the custom header possibility, the authenticator also by default encodes the Remote-User header with ‘b32encode’. The authenticator therefore also provides the possibility of storing the actual value for debugging purposes in the user.real_name variable via the jupyterhub auth_state mechanism of passing information to the spawner as noted at Authenticators.
Metadata
Release files for jhub-authenticators 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jhub-authenticators-0.1.0.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jhub_authenticators-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / jhub-authenticators-0.1.0.tar.gz
| Download URL | jhub-authenticators-0.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
813fc86a27c1b5110c6dfb63e69425dd54ff9d93b02f613dd172af8a2514e013
|
|
BLAKE2b-256 checksum How to use checksums |
64e7958d3600d9a293b93bc4f0892a780d5905b3423aa13c57939d42af14db99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
|
Release files / jhub_authenticators-0.1.0-py3-none-any.whl
| Download URL | jhub_authenticators-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
040b3d3a1ae8c7773f6aa136b6010fee45739b81922bd3a63bdd588c9499b556
|
|
BLAKE2b-256 checksum How to use checksums |
8ea8f1e5473563d31dd1c972f1030d2ffc7547d391d1eba72746e074f3566334
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
|
Security for jhub-authenticators 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.