Custos Jupyterhub Configuration

Enable Authentication

  The following configuration enables the CILogon-based Institutional login for Jupyterhub.

  • client_id: client_id is used to uniquely identify the tenant. 
  • client_secret:  This is used to construct the OAuth token to communicate with Custos APIs
  • custos_host: The Custos Server endpoint.

Aforementioned configrations can be downloaded from  Custos Portal.

from custosauthenticator.custos import CustosOAuthenticator
c.JupyterHub.authenticator_class = CustosOAuthenticator
c.CustosOAuthenticator.oauth_callback_url = CHANGE_ME
c.CustosOAuthenticator.client_id = CHANGE_ME
c.CustosOAuthenticator.client_secret = CHANGE_ME
c.CustosOAuthenticator.login_service = 'Custos Login'
c.CustosOAuthenticator.custos_host= CHANGE_ME

The following diagram shows the Jupyterhub authentication message flow

Enable Group-based Authorization

The following configuration enables the Group-based authorization for Juypterhub. All users belonging to the group are allowed to access Notebook servers. A group can be created from the Custos Portal and the rest of the users are not capable of running notebook servers.

c.CustosOAuthenticator.allowed_groups =["Group_Id"]
c.JupyterHub.shutdown_on_logout = True
c.Authenticator.enable_auth_state = True



  • No labels