Updating OAuthenticator for the littlest Jupyter hub

Hello everyone,

I’ve encountered the problem with authentication at our JupyterHub. I want to use GitHub auth and restrict access only to members of our organisation. Unfortunately, the littlest jupyter hub uses oauthenicator version 0.10.0, here are the logs I get after reloading Jupyter hub with sudo tljh-config reload hub and using sudo journalctl -u jupyterhub:

Oct 15 23:05:15 vm-for-data-team python3[143304]: [I 2021-10-15 23:05:15.983 JupyterHub app:2463] Running JupyterHub version 1.4.0
Oct 15 23:05:15 vm-for-data-team python3[143304]: [I 2021-10-15 23:05:15.984 JupyterHub app:2493] Using Authenticator: oauthenticator.github.GitHubOAuthenticator-0.10.0
Oct 15 23:05:15 vm-for-data-team python3[143304]: [I 2021-10-15 23:05:15.984 JupyterHub app:2493] Using Spawner: traitlets.traitlets.UserCreatingSpawner-5.1.0
Oct 15 23:05:15 vm-for-data-team python3[143304]: [I 2021-10-15 23:05:15.984 JupyterHub app:2493] Using Proxy: jupyterhub_traefik_proxy.toml.TraefikTomlProxy-0+unknown
Oct 15 23:05:15 vm-for-data-team python3[143304]: [I 2021-10-15 23:05:15.994 JupyterHub app:1534] Loading cookie_secret from /opt/tljh/state/jupyterhub_cookie_secret
Oct 15 23:05:16 vm-for-data-team python3[143304]: [W 2021-10-15 23:05:16.030 JupyterHub configurable:193] Config option `allowed_organizations` not recognized by `GitHubOAuthenticator`.

Config option allowed_organizations is not recognized because it was introduced later than in 0.10.0 version. I tried to update it with pip install --upgrade oauthenticator, and when I use pip freeze I see the correct upgraded version, but it doesn’t help - when I reload jupyter-hub, it still uses 0.10.0 version.

I’m updating it in the “base” environment which is created by the littlest jupyterhub by default. Maybe I should do it elsewhere?

According to the source code the hub environment is under /opt/tljh/hub

Thanks a lot, I used /opt/tljh/hub/bin/python -m pip install --upgrade oauthenticator and it solved my problem.

2 Likes