Configuring JupyterHub Authentication with LDAP/Active Directory

Configure JupyterHub to authenticate users directly from Active Directory.

Authenticating Users From Active Directory for JupyterHub

Create users in Active Directory and sign in to JupyterHub using those credentials.

  1. Access Apache Ambari.
  2. From the side toolbar, under Services select JupyterHub.
  3. Select Configs.
  4. Select Advanced.
  5. Under Advanced jupyterhub-config, add the following snippet to Base Settings:
    c.JupyterHub.authenticator_class        = 'ldapauthenticator.LDAPAuthenticator'
    c.LDAPAuthenticator.server_port         = <LDAP_SERVER_PORT>
    c.LDAPAuthenticator.server_address      = '<LDAP_HOST>'
    c.LDAPAuthenticator.lookup_dn           = False
    c.LDAPAuthenticator.use_ssl             = True
    c.LDAPAuthenticator.bind_dn_template    = <BIND_DN_TEMPLATE>  # Example: ["CN={username},CN=Users,DC=AD2019,DC=DOMAIN,DC=COM"]
  6. Save the configuration.
  7. Restart JupyterHub.
  8. Validate the changes.
    1. Sign in to JupyterHub with an Active Directory username and password, but without the domain.
    2. Verify sign in completes successfully.