Jupyter-OpenBIS-Authenticator
Description
This authenticator module for JupyterHub connects to a given openBIS instance, using the pyBIS module. It exports the environment variables
- OPENBIS_URL
- OPENBIS_TOKEN
to the user environment. Later, in a notebook, a user is then able to use pyBIS without any url, username or credentials:
from pybis import Openbis
o = Openbis()
Compatibility
This Authenticator works only with Jupyterhub > 0.8.0. This module was tested with version 0.8.1
The authenticator uses the spawner.environment feature to modify the users environment variables during session creation. This feature was introduced in Jupyterhub by version 0.8.0.
Installation
pip install jupyter_openbis_authenticator
Jupyterhub Configuration
Edit your jupyterhub_config.py file and add the following to register jupyter_openbis_authenticator as a JupyterHub authenticator class:
c.JupyterHub.authenticator_class = 'jupyter_openbis_authenticator.auth.OpenbisAuthenticator'
c.JupyterHub.spawner = 'jupyter_openbis_authenticator.auth.KerberosSudoSpawner'
if 'JUPYTERHUB_CRYPT_KEY' not in os.environ:
warnings.warn(
"Need JUPYTERHUB_CRYPT_KEY env for persistent auth_state.\n"
" export JUPYTERHUB_CRYPT_KEY=$(openssl rand -hex 32)"
)
c.CryptKeeper.keys = [ os.urandom(32) ]
# enable persisting auth_state, i.e. enable JupyterHub to change the environment variables of the user.
c.Authenticator.enable_auth_state = True
# openBIS settings
c.OpenbisAuthenticator.server_url = 'https://my_openbis_instance.ch'
c.OpenbisAuthenticator.verify_certificates = True
RRPPersistentBinderSpawner
This spawner reads directories from a specified project folder and presents them to the logged-in user. The user then can launch virtual machines (using kubernetes) with the given running environment that repo2docker detects in the chosen project folder.
Changes in jupyterhub_config.py to enable this spawner:
c.JupyterHub.spawner_class = 'jupyter_openbis_authenticator.spawner.RRPPersistentBinderSpawner'
c.JupyterHub.spawner_class = 'rrp_pbh_spawner'
c.RRPPersistentBinderSpawner.projects_dir = '/path/to/my/projects'
Metadata
Release files for jupyter-openbis-authenticator 0.5.5
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 | |
|---|---|---|---|---|
| jupyter_openbis_authenticator-0.5.5.tar.gz | 11.9 kB | Without provenance | Details |
Release files / jupyter_openbis_authenticator-0.5.5.tar.gz
| Download URL | jupyter_openbis_authenticator-0.5.5.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7f841cd8f9264bd0816c6ef7beeee572b3c5b0f7a17c4c70c798d490d4bfaec
|
|
BLAKE2b-256 checksum How to use checksums |
160862b82bd8b7658b50a62bb13486791991c6ba0db429a1dc5b828111e8240e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2
|
Security for jupyter-openbis-authenticator 0.5.5
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.