Hi,
I have a docker compose that contain 3 services: jupyterhub, jupyterlab and traefic.
When I connect on jupyterlab console I have the user by default jovyan, I would like to change it by the userid. I tried many solutions (configurations I mean), I searched a forums, I tried to do the same according my use, but still I have jovyan user in jupyterlab console.
I did an ldapsearch request to display all groups LDAP of users, it works well:
ldapsearch -x -D "cn=proxyagent" -H ldaps://annuaire_ldap -b 'ou=1111,o=2222' '(&(cn=333*)(memberuid=my_login))' -w password
I tried to add these configuratins in jupyterhub_config.py, but still in vein.
I tried also to add the real parameters in c.Spawner.environment, when I add the real values I got my login as user connected in jupyterlab instead of jovyan, but I don’t know hpw can I generalize it the command line bellow.
c.Spawner.environment = {'GRANT_SUDO': 'yes', "NB_USER": "{login}", "NB_UID" :"89211","NB_GID" : 79999}
My configurations in jupyterhub_config.py is the following:
c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
# Must match LDAPAuthenticatorInfoUID.pre_spawn_start
c.LDAPAuthenticator.server_address = 'ldaps://server_name:port'
c.LDAPAuthenticator.server_port = port_number
# obligatoire pour trouver l'user dans l'annuaire LDAP
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})'
c.LDAPAuthenticator.lookup_dn_search_user = 'cn=proxyagent'
c.LDAPAuthenticator.lookup_dn_search_password = 'password'
c.LDAPAuthenticator.user_search_base = "ou=Nominatifs,ou=company,ou=People,o=oudcompany"
c.LDAPAuthenticator.user_attribute = 'uid'
c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'cn'
c.LDAPAuthenticator.escape_userdn = False
#c.LDAPAuthenticator.search_filter = '(&(cn=gdx*)(memberuid={username}))'
c.LDAPAuthenticator.auth_state_attributes = ['uid', 'uidNumber']
c.LDAPAuthenticator.use_lookup_dn_username=False
Really I need your help and expertise. How can I modify the configuration to return the userid in jupyterlab console instead of jovyan ?
Links that I tried there solutions:
https://github.com/hansohn/jupyterhub-ldap-authenticator
And:
Please help, Thanks a lot