Skip to main content
Version 3.0

Who gets into JupyterHub
and what each server can reach.

Five scenarios: changing the default password, login through LDAP, login through Active Directory, the identity the pods run with, and the servers' network rules.

ChartVersion3.0.3TypeapplicationAppVersion5.3.0
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+
Feature SupportLDAPsupported

Login to JupyterHub is handled by the Hub's authenticator: by default, a test login with the admin user. With LDAP or Active Directory, each person logs in with their company directory account. After login, each notebook server runs with a NetworkPolicy that limits traffic and with the chart's own ServiceAccount.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

Change the admin user's temporary password before any real use.

The chart starts JupyterHub with a test login: the admin user, with a temporary password. Before using JupyterHub for anything beyond testing, you set your own password in a private values file, or switch to LDAP (scenario 2).

Test login

dummy authenticator, admin user, ChangeMe!T3c password, in hub.config.DummyAuthenticator.password.

The Hub test login

namespace <NAMESPACE>loginstartsegressWho connectsuser and passwordHubDummyAuthenticatorServers ×3NetworkPolicyServiceAccountno token mountedEgress allowedDNS, cluster, external
  1. Who connects. By default, the login is the admin user with the DummyAuthenticator.password password.
  2. Authentication in the Hub. The test authenticator accepts the admin user with the password from the values file. Chart default: dummy, admin user. (tdp-jupyter.hub.config.JupyterHub.authenticator_class)
  3. User servers. Each server has a NetworkPolicy that restricts inbound and outbound traffic, and runs with the chart's own ServiceAccount, with no token mounted. Chart default: NetworkPolicy on. (tdp-jupyter.singleuser.networkPolicy)
  4. Servers ServiceAccount. Created by the chart. Without it, the servers would run with the namespace's default ServiceAccount and inherit any SCC that another chart has bound to it. Chart default: tdp-jupyter-singleuser. (tdp-jupyter.singleuser.serviceAccountName)
  5. Egress rules. The chart's list allows DNS, the cluster pods, external addresses and the TDP component services. Defining the list in your file replaces the whole list. (tdp-jupyter.singleuser.networkPolicy.egress)
The test login: the Hub accepts the admin user with the password from the values file. Click an element to see the matching default.

Click the markers to understand each line. Keep this file out of version control.

1tdp-jupyter:
2hub:
3 config:
4 DummyAuthenticator:
5 username: admin
6 password: "<PASSWORD>"

Everything that belongs to JupyterHub sits under the subchart key.

  1. Chart prefix (linha 1). Everything that belongs to JupyterHub sits under the subchart key.
  2. User (linha 5). The test login user.
  3. Password (linha 6). The test login password. Replace the chart's temporary one with your own.
Your own password

Write the password in a private values file

The password does not go into a versioned file.

If you prefer not to keep the password in a file, pass it with --set in the command or through an external secrets tool.

Apply it to the release

The same command installs and upgrades.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>

It worked when

The interface accepts the admin user with the password you set.

When something goes wrong​

Troubleshooting

Paste the error message or choose the symptom. The answer comes with the cause, what to do and the command.

  1. invalidCredentials on login through Active Directory. Cause: The search account password was placed in hub.config.LDAPAuthenticator. The hub.config values are applied literally, without evaluating Python: the text os.environ.get(...) becomes the password itself. What to do: Set lookup_dn_search_password in hub.extraConfig, which is Python, reading the LDAP_BIND_PASSWORD variable (scenario 3).
  2. The Hub does not start after turning on Active Directory. Cause: The values file references the tdp-jupyter-ldap-bind Secret in hub.extraEnv, but the Secret does not exist in the namespace. What to do: Create the Secret before applying the values file (scenario 3).
  3. Connecting to /<pod-ip>:2222 timed out. Cause: The inbound rule that lets the Spark workers reach the driver on the user's server is missing. What to do: Add the inbound rule to the servers' networkPolicy, as in Integrations - JupyterLab, Spark cluster scenario.
  4. OpenShift rejects the Hub pod. Cause: The Hub was installed with a fixed UID and GID, which the restricted-v2 SCC rejects. What to do: Install with the Hub UID and GID empty, as in JupyterLab Configuration, First contact scenario.
  5. Another login problem. Cause: The Hub log shows what happens on each login attempt. What to do: Read the Hub log right after an attempt.

Best practices​

  • Change the default password before using JupyterHub for anything beyond testing, or switch to LDAP.
  • With a search account, keep its password in a Secret created before the installation, not in the values file.
  • Use c.Authenticator.allow_all = True only to relax access during testing.
  • In Active Directory, set the search account password in hub.extraConfig.
  • When changing the egress rules, start from the chart's complete list.

All parameters​

The chart prefix is already filled in. Keys without a prefix sit at the root of the values file.

15 of 15 parameters

ParameterDescriptionChart default
tdp-jupyter.hub.config.JupyterHub.authenticator_classLoginAuthentication class. ldapauthenticator.LDAPAuthenticator for LDAP and ADdummy
tdp-jupyter.hub.config.DummyAuthenticator.usernameLoginTest login useradmin
tdp-jupyter.hub.config.DummyAuthenticator.passwordLoginTest login password. Change it before any real useChangeMe!T3c
tdp-jupyter.hub.config.LDAPAuthenticatorLDAP and ADServer, port, tls_strategy, login attribute and bind form (bind_dn_template in LDAP, lookup_dn and a search account in AD)not set
tdp-jupyter.hub.extraEnvLDAP and ADHub environment variables. With a search account, delivers LDAP_BIND_PASSWORD from the Secret{}
tdp-jupyter.hub.extraConfigLDAP and ADPython blocks evaluated by the Hub. In AD, it receives the search account passwordchart blocks
tdp-jupyter.singleuser.networkPolicy.enabledNetworkNetworkPolicy of the user serverstrue
tdp-jupyter.singleuser.networkPolicy.egressNetworkEgress rules of the servers. Defining the list in your file replaces the whole listDNS, cluster pods, external addresses and TDP component services
tdp-jupyter.hub.podSecurityContext.runAsNonRootIdentityNon-root Hubtrue
tdp-jupyter.hub.podSecurityContext.runAsUserIdentityHub UID. Empty on OpenShift1000
tdp-jupyter.hub.podSecurityContext.runAsGroupIdentityHub GID. Empty on OpenShift1000
tdp-jupyter.singleuser.allowPrivilegeEscalationIdentityPrivilege escalation on the user serversfalse
tdp-jupyter.singleuser.serviceAccountNameIdentityServiceAccount of the user servers, created by the chart with no token mountedtdp-jupyter-singleuser
tdp-jupyter.scheduling.userScheduler.containerSecurityContext.runAsNonRootIdentityNon-root user-scheduler. true on OpenShiftfalse
openshift.enabledIdentityForces OpenShift mode when automatic detection cannot reach the APIfalse

Next steps​