Hello,
I find out a behavior which cannot be considered like a bug but which is still not a normal behavior in my point of view. To understand why, here is my story:
I wrote a web app for an intranet. It uses django and the django_auth_ldap. Authentication is done matching if the user/pass is correct AND if the user belongs to a pre-defined LDAP group (with AUTH_LDAP_GROUP_SEARCH).
One of my user could not log in anymore since some hours.
To analyse the cause I asked the user to try to log in on my developpement server which is configured to have the log verbosity set to the DEBUG level. Surprisingly I could not see anything in the ldap log file with a "tail -f". After some more research I found out that the user was removed by another team from the requisite LDAP group. So it was correct that the ldap module refuses the authentication. So why was nothing logged to the log file?
I think it is because I set the option AUTH_LDAP_CACHE_GROUPS to True. And when the response comes from the cache, nothing is logged, even in DEBUG mode. Restarting the web serveur (nginx, apache, uwsgi ...) make things working the first try since the cache is cleared and a request is done to the ldap server.
I think that django_auth_ldap should log everything in DEBUG mode, even if no request is done to the LDAP server and the response comes from the CACHE.
What do you think guys?
Best regards,
Nicolas