Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set LDAP auth using below config file #182

Open
sangarole opened this issue Nov 4, 2020 · 1 comment
Open

Unable to set LDAP auth using below config file #182

sangarole opened this issue Nov 4, 2020 · 1 comment

Comments

@sangarole
Copy link

Command ran to configure it for LDAP authentication using Active directory.

/home/jupyterhub-admin/anaconda3/bin/jupyterhub -f /app/jupyterhub_config.py

Getting below error:

[I 2020-11-04 17:54:55.145 JupyterHub app:1673] Using Authenticator: ldapauthenticator.ldapauthenticator.LDAPAuthenticator-1.3.2
[I 2020-11-04 17:54:55.146 JupyterHub app:1673] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-0.9.6
[I 2020-11-04 17:54:55.149 JupyterHub app:1016] Loading cookie_secret from /app/jupyterhub_cookie_secret
[I 2020-11-04 17:54:55.167 JupyterHub proxy:431] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2020-11-04 17:54:55.169 JupyterHub configurable:168] Config option server_hosts not recognized by LDAPAuthenticator. Did you mean one of: server_address, server_port?
[W 2020-11-04 17:54:55.170 JupyterHub configurable:168] Config option user_search_filter not recognized by LDAPAuthenticator. Did you mean one of: lookup_dn_search_filter, search_filter, user_search_base?
[W 2020-11-04 17:54:55.170 JupyterHub configurable:168] Config option group_search_base not recognized by LDAPAuthenticator. Did you mean one of: lookup_dn_search_password, lookup_dn_search_user, user_search_base?
[W 2020-11-04 17:54:55.171 JupyterHub configurable:168] Config option group_search_filter not recognized by LDAPAuthenticator. Did you mean one of: lookup_dn_search_filter, lookup_dn_search_user, search_filter?
[W 2020-11-04 17:54:55.172 JupyterHub configurable:168] Config option allow_nested_groups not recognized by LDAPAuthenticator. Did you mean allowed_groups?
[W 2020-11-04 17:54:55.173 JupyterHub configurable:168] Config option create_user_home_dir not recognized by LDAPAuthenticator.
[W 2020-11-04 17:54:55.173 JupyterHub configurable:168] Config option create_user_home_dir_cmd not recognized by LDAPAuthenticator.
[W 2020-11-04 17:54:55.174 JupyterHub app:1173] No admin users, admin interface will be unavailable.
[W 2020-11-04 17:54:55.174 JupyterHub app:1174] Add any administrative users to c.Authenticator.admin_users in config.
[I 2020-11-04 17:54:55.174 JupyterHub app:1201] Not using whitelist. Any authenticated user will be allowed.
[I 2020-11-04 17:54:55.213 JupyterHub app:1855] Hub API listening on http://127.0.0.1:8081/hub/
[W 2020-11-04 17:54:55.214 JupyterHub proxy:565] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2020-11-04 17:54:55.215 JupyterHub proxy:567] Starting proxy @ http://:8000
17:54:55.463 [ConfigProxy] info: Proxying http://*:8000 to (no default)
17:54:55.468 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
[I 2020-11-04 17:54:55.638 JupyterHub proxy:301] Checking routes
[I 2020-11-04 17:54:55.639 JupyterHub proxy:370] Adding default route for Hub: / => http://127.0.0.1:8081
17:54:55.639 [ConfigProxy] info: 200 GET /api/routes
17:54:55.641 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
17:54:55.642 [ConfigProxy] info: 201 POST /api/routes/
[I 2020-11-04 17:54:55.643 JupyterHub app:1912] JupyterHub is now running at http://:8000
^C

Below is my config file for jupyterhub

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.server_hosts = 'DCname'
#c.LDAPAuthenticator.bind_user_dn = 'CN=imauser,CN=Users,DC=ex,DC=coml'
#c.LDAPAuthenticator.bind_user_password = 'imapassword'
c.LDAPAuthenticator.user_search_base = 'CN=ex,DC=ex,DC=com'
c.LDAPAuthenticator.user_search_filter = '(&(objectCategory=person)(objectClass=user)(sAMAccountName={username}))'
#c.LDAPAuthenticator.user_membership_attribute = 'memberOf'
c.LDAPAuthenticator.group_search_base = 'OU=AWS,OU=Groups,DC=zsservices,DC=local'
c.LDAPAuthenticator.group_search_filter = '(&(objectClass=group)(memberOf={group}))'
c.LDAPAuthenticator.allowed_groups = ['CN=grpp,OU=ex,OU=ex,OU=Groups,DC=ex,DC=ex']
c.LDAPAuthenticator.allow_nested_groups = True
c.LDAPAuthenticator.username_pattern = '[a-zA-Z0-9_.][a-zA-Z0-9_.-]{8,20}[a-zA-Z0-9_.$-]?'
c.LDAPAuthenticator.create_user_home_dir = True
c.LDAPAuthenticator.create_user_home_dir_cmd = ['mkhomedir_helper']

Jupyter packages installed o my server:
-bash-4.2$ pip list jupyter | grep jup
jupyter 1.0.0
jupyter-client 5.3.4
jupyter-console 6.1.0
jupyter-core 4.6.1
jupyterhub 0.9.6
jupyterhub-ldapauthenticator 1.3.2
jupyterlab 1.2.6
jupyterlab-server 1.0.6
-bash-4.2$

@welcome
Copy link

welcome bot commented Nov 4, 2020

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant