I have setup Graphite Web 0.9.9 on CentOS 6.2 x86_64 at EC2 and I'm trying to get LDAP authentication to work against 389 Directory Server. I have configured local_settings.py with:
- USE_LDAP_AUTH
- LDAP_URI
- LDAP_SEARCH_BASE
- LDAP_BASE_USER
- LDAP_BASE_PASS
- LDAP_USER_QUERY
But I still get "Authentication attempt failed" every time I try to log in. Looking at the logs on the LDAP server, it doesn't look like graphite-web is connecting to the LDAP server at all. Unfortunately, I don't see anything useful in the logs on the graphite server - I only see "access.log" and "info.log". "error.log" and "exception.log" are empty.
Any bright ideas on what can I do to further troubleshoot this?
Did you have the python-ldap package installed on this centos 6 host?
I got this working after installing it, a minimal centos installation does not include it, and the graphite packages from epel don't mark it a a dependency. You will need to reload httpd after installing it.
Access logs should include everything about the connection request. Start with isolating firewall & try a telnet. If you can telnet, Try to run native ldapsearch against ldap server & see if it returns data.
Access logs will contain all data related to that connection. Paste access logs after sanitizing IP address to investigate the issue. You can also mail to [email protected] for any issues.
If you're using LDAP to communicate with an Active Directory server, Try turning off referral chasing.
I added these lines to local_settings.py.
Since django 1.11,
Then, since django 2.1,
And it seems like graphite, in particular
graphite/account/ldapBackend.py
was never updated. I addedrequest
as first parameter ofauthenticate
in that file and login worked for me: