3

I set up an OpenLDAP server using this docker image: https://github.com/osixia/docker-openldap For TLS support I used Let's Encrypt certificates following this: https://serverfault.com/questions/777017/using-lets-encrypt-certificates-with-openldap

I can connect to the server via ldapsearch. As well using openssl s_client shows me a valid server certificate and opens TLS connection. I guess this works because openssl and ldapsearch use the CA store of my OS and there Let's Encrypt is fine. In addition, I use python to connect to the server. Thereby, I wrap a socket with the ca cert provided and it works.

However I can not make the connection running using phpldapadmin. When using default settings I receive a simple error:

Could not start TLS. Please check your LDAP server configuration.

Can't contact LDAP server (-1)

In the end I am looking for a way to use phpldapadmin like I use ldapsearch. But for me it seems like I can only enable full client TLS mode using private keys etc. However, I would like to use it just like web pages providing the CA certificate.

Is there anything I missed or configured wrong?

Thanks in advance!

enricoba
  • 31
  • 2
  • 1
    Did you find a solution to this? – Jimbo May 02 '20 at 13:38
  • I'm having a similar problem: I've got an LDAP server using a Let's Encrypt certificate up and running (for several months now). I've also configured several working clients, but I can't get a WordPress LDAP integration to run. The problem also seems to boil down to something with PHP, because I already can't bind to the server from the PHP shell, I always get the error "TLS: peer cert untrusted or revoked (0x42)" – TuringTux Oct 03 '21 at 17:04
  • My solution in the end was (if I remember correctly) to include `TLS_CACERT /etc/ssl/certs/ca-certificates.crt` into `/etc/ldap/ldap.conf` (having that line in the configuration was already mentioned in the linked Server Fault post and something I apparently missed) – TuringTux Jun 14 '22 at 10:31

1 Answers1

0

First stop any thing on port 80 (apache,nginx, if there Is ...) and then You have to open port 80 for that container.