bheisig / i-doit-docker

Dockerized i-doit CMDB
GNU Affero General Public License v3.0
25 stars 13 forks source link

ldap over SSL working in docker image? #9

Open WaaZaa666 opened 3 years ago

WaaZaa666 commented 3 years ago

I would like to doublecheck that the LDAP over SSL configuration should be working in these docker images. Everything else seems to work great! The exact ldap configuration does work with other software, so I suspect something is missing/unconfigured in the docker image. I have also installed openssl in the idoit container, to validate certs and connectivity, output in logs below does show it should work.

Expected behavior

I would expect the ldap over SSL to work, after configuring.

Actual behavior

ldap debug windows says:

Error!
LDAP Bind failed (Can't contact LDAP server). Host: ldaps.domain.com

Steps to reproduce the behavior

Configure ldap server, enable LDAPS in de TLS field

Environment

Question Answer
i-doit version 1.16
i-doit edition open
PHP version 7.4
Service fpm

Server logs

[2021-03-22T11:31:18.259787+01:00] ldap.DEBUG: Testing connection to ldaps.domain.com:636 (CN=<SNIPPED>) [] []

openssl s_client -connect ldaps.domain.com:636
CONNECTED(00000003)
..
SSL handshake has read 3812 bytes and written 487 bytes
Verification: OK

Verify return code: 0 (ok)
MichaelOv commented 3 years ago

Hello @WaaZaa666

i have testet it with the actual docker-compose-fpm.yml. It installs 4 docker container with i-doit Version 1.17.1

I have copied the ca-certificate.crt to the idoit container into the folder /usr/local/share/ca-certificates/ At the idoit container execute update-ca-certificates create a folder /etc/ldap/ and a file /etc/ldap/ldap.conf with the following content TLS_CACERT /etc/ssl/certs/ca-certificate.pem you may have to alter the certificate.pem part. restart the idoit container

Use LDAPS :>