Issue Summary
We get a 500 whenever trying ldap credentials at /ldap/login after following https://redash.io/help/open-source/admin-guide/ldap-authentication/ to add ldap support to our redash install.
Technical details:
Followed admin guide here: https://redash.io/help/open-source/admin-guide/ldap-authentication/
Verified my values are correct with ldapsearch tool:
ldapsearch -vx -H ldap://DELETED.DELETED.DELETED -b "ou=DELETED,dc=DELETED,dc=DELETED" -D "cn=DELETED,dc=DELETED,dc=DELETED" -W "(uid=DELETED)" | grep result
Enter LDAP Password:
filter: (uid=DELETED)
requesting: All userApplication attributes
# search result
result: 0 Success
Threw those values into env:
PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=DELETED
REDASH_COOKIE_SECRET=DELETED
REDASH_SECRET_KEY=DELETED
REDASH_DATABASE_URL=DELETED
REDASH_LDAP_LOGIN_ENABLED=true
REDASH_PASSWORD_LOGIN_ENABLED=true
REDASH_LDAP_URL=ldap://DELETED.DELETED.DELETED:389
REDASH_LDAP_SEARCH_DN="ou=DELETED,dc=DELETED,dc=DELETED"
REDASH_LDAP_BIND_DN="cn=DELETED,dc=DELETED,dc=DELETED"
REDASH_LDAP_BIND_DN_PASSWORD="DELETED"
Now when we submit creds good or bad to the ldap login page, it throws the 500:
[2020-07-16 21:21:08,457] ERROR in app: Exception on /ldap/login [POST]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/redash/authentication/ldap_auth.py", line 39, in login
ldap_user = auth_ldap_user(request.form['email'], request.form['password'])
File "/app/redash/authentication/ldap_auth.py", line 71, in auth_ldap_user
auto_bind=True
File "/home/redash/.local/lib/python2.7/site-packages/ldap3/core/connection.py", line 355, in __init__
self.do_auto_bind()
File "/home/redash/.local/lib/python2.7/site-packages/ldap3/core/connection.py", line 384, in do_auto_bind
raise LDAPBindError(self.last_error)
LDAPBindError: None
- Redash Version: latest
- Browser/OS: Chrome, Firefox
- How did you install Redash: install script
- LDAP: RFC2307
All help is very appreciated. Let me know what other information I can provide.