AWX ldap logs verbosity.

Hi I am trying to troubleshoot an LDAP integration issue and I need a way to get more verbose logs.

I have put the following line in /etc/tower/settings.py LOGGING[‘handlers’][‘tower_warnings’][‘level’] = ‘DEBUG’

I then pull the logs from the awx-web container.

docker logs

If I enter a non-existent username I get something in the logs.

2018-04-19 12:45:19,706 DEBUG django_auth_ldap search_s(‘CN=users,DC=sales,DC=local’, 2, ‘(sAMAccountName=%(user)s)’) returned 0 objects:

2018-04-19 12:45:19,706 DEBUG django_auth_ldap Authentication failed for sDszc: failed to map the username to a DN.

However if I use a correct username with correct or incorrect password I get nothing and the login fails.

Is there anyway to increase the logging verbosity to see what on earth in going on?

Many thanks.


I ended up just using wire shark to determine the issue

So what was the issue? I’m facing the same thing in one environment, but not the other, and the lack of valid debugging logs is driving me batshit.

My issue was something as simple as the group DN being incorrect.

If you use Wireshark it can dissect the ldap traffic and it should give you a clear idea of what is going on if you are just using straight LDAP and not ldaps

Thanks!

Annoyingly in my case it had cached something in AWX from prior LDAP work that was causing logins to fail even after the LDAP was configured correctly.

I removed the cached accounts and login worked properly.