ldapauthenticator
ldapauthenticator copied to clipboard
500 Error to connect with openLDAP
Hi all. I have an issues that my jupyterhub cannot make login or make 500 error. Here is what my situation is.
I'm using
Server : AWS EC2 Installed : AWS TLJH (https://tljh.jupyter.org/en/latest/install/amazon.html) Using : OpenLDAP 1.2.2, Python 3.6(installed by TLJH automatically), Ubuntu 18.04 File Path : /opt/tljh/hub/lib/python3.6/site-packages/tljh Added :
c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.server_address = 'myIP'
c.LDAPAuthenticator.bind_user_dn = 'myAdminID'
c.LDAPAuthenticator.bind_user_password = 'myUserPW'
c.LDAPAuthenticator.user_search_base = 'ou=users,dc=myURL ,dc=com'
c.LDAPAuthenticator.user_search_filter = '(&(objectClass=posixAccount)(uid={username}))'
c.LDAPAuthenticator.username_pattern = '[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?'
c.LDAPAuthenticator.create_user_home_dir = True
c.LDAPAuthenticator.create_user_home_dir_cmd = ['Idon't know what to write']
c.LDAPAuthenticator.user_attribute = 'uid'
Actually I tried quite a lot but I cannot make it.
When I add
c.LDAPAuthenticator.lookup_dn = True
any ID and PW occurs 500 error.
When I add
c.LDAPAuthenticator.lookup_dn = False
c.LDAPAuthenticator.bind_dn_template = ["uid={username},dc=codinghub,dc=com"]
occurs 500 error.
Any trials occurs 500 error. Is there anyone who solved this problem?
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
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.
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! :wave:
Welcome to the Jupyter community! :tada:
Hi, I don't think the attribute c.LDAPAuthenticator.user_search_filter = '(&(objectClass=posixAccount)(uid={username}))' exists. It's rather ''c.LDAPAuthenticator.search_filter'' https://github.com/jupyterhub/ldapauthenticator/blob/c11e26d9d649efa7849291285f74fd9eecdcf1bb/ldapauthenticator/ldapauthenticator.py#L212-L214