jupyterhub-ldap-authenticator icon indicating copy to clipboard operation
jupyterhub-ldap-authenticator copied to clipboard

LDAP Query Returning More Than One Result

Open kakoneh opened this issue 2 years ago • 3 comments

I'm experiencing Jupyterhub Login failure when LDAP query is configured to do a full domain search and returns multiple result. We're doing a full domain search of our organization because Jupyterhub users spans multiple OUs. The same LDAP query in Powershell returns a single result or user. All tips and suggestions are welcome... Thanks in advance...

The configuration we're using looks like below:

  • c.LDAPAuthenticator.user_search_base = 'DC=xxxx,DC=com'
  • c.LDAPAuthenticator.user_search_filter = '(&(objectCategory=person)(objectClass=user)(sAMAccountName={username}))'

Please fine the error response string below(Replaced secrets with 'x')

"Nov 23 09:11:38 Linux Server jupyterhub[1472835]: [I 2022-11-23 09:11:38.895 JupyterHub log:189] 200 GET /hub/login (xxxxx) 28.69ms(xxxxxxx) 28.69ms
Nov 23 09:12:04 xxxxxx jupyterhub[1472835]: [E 2022-11-23 09:12:04.216 JupyterHub ldapauthenticator:521] LDAP search '(&(objectCategory=person)(objectClass=user)([email protected]))' returned 4 results. Please narrow search to 1 result
Nov 23 09:12:04 Linux Server jupyterhub[1472835]: [W 2022-11-23 09:12:04.216 JupyterHub base:823] Failed login for , xxxxxx"

kakoneh avatar Nov 23 '22 17:11 kakoneh

This problem is solved here https://github.com/hansohn/jupyterhub-ldap-authenticator/pull/20/files

Armadik avatar Nov 29 '22 08:11 Armadik

@Armadik, thanks for your response... One more question on this, as I have already installed Jupyterhub on Redhat Linux 8, how do I update Jupyterhub or LDAP to pull in these new fixes?

kakoneh avatar Nov 29 '22 15:11 kakoneh

@Armadik also, the commit/Code Change you pointed me to was never merged...

kakoneh avatar Nov 29 '22 16:11 kakoneh