Cannot see Admin pannel in jupyterhub when using LDAP authentication and following .yaml config file?

Cannot see Admin pannel in jupyterhub when using LDAP authentication and following .yaml config file, is it possible to use active directory users for admin pannel ?

My users log in with active directory users and there is no problem with log in…but cannot still see admin pannel from Hub Control Pannel …

config.yaml file is (not complete file, just partial):

proxy:
secretToken: “254334e575a7d8ebf8ac36581a17a3580cda1d362fdf668cf4e9204683c17c1d”
singleuser:
image:
name: jupyterhub/k8s-singleuser-sample
tag: “1.2.0”
profileList:
- display_name: “Python3”
description: “Python3”
default: true
- display_name: “R”
description: “R”
kubespawner_override:
image: jupyter/r-notebook:r-4.1.2
defaultUrl: “/lab”
storage:
dynamic:
storageClass: storage-hdd
cpu:
limit:
guarantee:
memory:
limit:
guarantee: 2G
hub:
config:
Authenticator:
admin_users:
- saljooghi
JupyterHub:
admin_access: true
authenticator_class: ldapauthenticator.LDAPAuthenticator
LDAPAuthenticator:
escape_userdn: false
lookup_dn: true
lookup_dn_search_filter: ({login_attr}={login})

Hi! Please could you give us a bit more information:

  • how is your Kubernetes cluster deployed and configured
  • how is JupyterHub accessed
  • what version of Z2JH are you using
  • show us your hub logs with debug logging enabled

Hi manics;

1- I used snapd and microk8s kubernetes cluster
2- Using ldap protocol to access to my company’s active directory for authentication (I read somewhere that cannot have admin users when using ldap authentication not sure if it is true or not!)
3- the latest documnet of z2jh

4- this is hub pod logs, I have loged in with active directory username (i.e. “saljooghi” and mentioned in config.yaml file that this user is admin user…) successfully but cannot see admin pannel from Hub control pannel:

[I 2022-01-10 09:04:17.587 JupyterHub log:189] 302 GET /hub/logout → /hub/login (@::ffff:192.168.62.17) 7.08ms
[I 2022-01-10 09:04:17.604 JupyterHub log:189] 200 GET /hub/login (@::ffff:192.168.62.17) 2.40ms
[I 2022-01-10 09:05:15.906 JupyterHub proxy:347] Checking routes
[I 2022-01-10 09:06:15.902 JupyterHub proxy:347] Checking routes
[I 2022-01-10 09:07:15.902 JupyterHub proxy:347] Checking routes
[I 2022-01-10 09:08:15.897 JupyterHub proxy:347] Checking routes
[I 2022-01-10 09:08:16.003 JupyterHub log:189] 200 GET /hub/api/users (cull-idle@::1) 18.60ms
[I 2022-01-10 09:08:58.660 JupyterHub base:762] User logged in: javad saljooghi
[I 2022-01-10 09:08:58.661 JupyterHub log:189] 302 POST /hub/login?next= → /user/javad%20saljooghi/ (javad saljooghi@::ffff:192.168.62.17) 758.67ms
[I 2022-01-10 09:08:58.786 JupyterHub log:189] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-javad%2520saljooghi&redirect_uri=%2Fuser%2Fjavad%2520saljooghi%2Foauth_callback&response_type=code&state=[secret] → /user/javad%20saljooghi/oauth_callback?code=[secret]&state=[secret] (javad saljooghi@::ffff:192.168.62.17) 24.48ms
[I 2022-01-10 09:08:58.841 JupyterHub log:189] 200 POST /hub/api/oauth2/token (javad saljooghi@10.1.102.136) 35.21ms
[I 2022-01-10 09:08:58.856 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret] (javad saljooghi@10.1.102.136) 11.11ms
[I 2022-01-10 09:08:59.623 JupyterHub log:189] 200 GET /hub/api/authorizations/token/[secret] (javad saljooghi@10.1.102.136) 15.34ms
[I 2022-01-10 09:09:06.841 JupyterHub log:189] 200 POST /hub/api/users/javad%20saljooghi/activity (javad saljooghi@10.1.102.136) 14.69ms
[I 2022-01-10 09:09:15.913 JupyterHub proxy:347] Checking routes
[I 2022-01-10 09:09:28.780 JupyterHub log:189] 200 GET /hub/home (javad saljooghi@::ffff:192.168.62.17) 12.96ms

let me ask my questions this way; How should I config my z2jh which uses ldap authenticator to have active directory users as admin and getting access to admin pannel?

Best Regards;

Is this working if you use the DummyAuthenticator? Authentication and authorization — Zero to JupyterHub with Kubernetes documentation

This will help narrow down whether the problem is in JupyterHub, or in you Authenticator configuration.

1 Like

tnx Manics; I got all the html template from official jupyterhub github : jupyterhub/share/jupyterhub/templates at main · jupyterhub/jupyterhub · GitHub

Guess there is some problem in rendering page.html file when it gets to line 125 which wants to find admin…I made a volume and injected html files to Hub pod by mounting path…also did that for logo.png and after decrypt it as base64 inject it as secret to the pod and it works… and also customized login.html page.

All in all; when I deleted page.html file admin section appears I’m wondering since all the other html pages extend from page.html that may create problem deleting parent page, otherwise it is ok right now…

Could you pls add more details to how costomize jupyterhub pages and under which path putting css files and images …

In the guide there is not much info how to easily and efficiantly customizing and rebranding jupyterhub…

First of all you should start from the templates corresponding to the version of JupyterHub that you’re using instead of the main branch, see the list of tags: Tags · jupyterhub/jupyterhub · GitHub

Have you tried making a very minimal change to a template, e.g. just add a line of text, then iteratively adding more changes?