Hi @melidonis, have you confirmed that your docker container is able to see and connect to the LDAP server via other means outside of WordPress? Additionally, do you have another WordPress install on a different system that you have already verified can connect to the LDAP server?
That aside, you can enable error logging in WordPress by doing the following:
https://www.wpbeginner.com/wp-tutorials/how-to-set-up-wordpress-error-logs-in-wp-config/
This should display any error messages from within Authorizer in the WordPress error logs.
I hope this helps!
Hi. I’m very sorry for the late response but some personal stuff came up.
I have other WP installations that work with the exact same configuration.
In the same machine with the dockerized WP, I have non-dockerized WP installations that have authorizer working fine.
Also from docker I can query with ldap-search without any problems.
Can you verify which version of Authorizer you have installed? Have you enabled error logging, and do the logs show any issues?
Right now Authorizer silences LDAP errors so it can fall back to WordPress authentication (since they share the same login form and some folks want to use both).
But I’m currently working on an LDAP debug tool so you can get details information about where any failure is occurring.
Should be out within a week! In the meantime you can try inserting your own error logging, the LDAP code starts here:
https://github.com/uhm-coe/authorizer/blob/master/src/authorizer/class-authentication.php#L882-L893
Aloha, version 3.3.0 is out now with the extra LDAP test with more detailed logging. Find it at the bottom of the LDAP section in Authorizer Settings.
The test button with the detailed logging was very helpful. Really, great job.
The problem was with TLS. When I use “Authorizer” with a classic, local installation of WordPress it works with TLS enabled. When I use “Authorizer” with a dockerized WordPress, with the same LDAP server, it only works if I disable TLS. I can’t understand why, but as far as I’m concerned, problem solved.
Great! Yeah there are so many possible LDAP configurations, it can be messy trying to narrow down the correct settings.
+1 with same issue, can’t use ldaps.
Be aware that ldaps and start_tls are different for LDAP. You should not use both at the same time.
https://www.php.net/manual/en/function.ldap-start-tls.php#51879