tiredofit / docker-fusiondirectory

Dockerized web based LDAP manager
MIT License
48 stars 18 forks source link

LDAP TLS error #31

Open mjmucha opened 4 years ago

mjmucha commented 4 years ago

Hi there. I have an working TLS configuration for LDAP (see https://github.com/tiredofit/docker-openldap/issues/21).

But Fusion Directory has problems to connect to the LDAP server over TLS. My docker-compose is:

  fusiondirectory:
    container_name: fusiondirectory
    image: tiredofit/fusiondirectory:latest
    depends_on:
      - ldap
    security_opt:
      - no-new-privileges:true
      - label:disable
    volumes:
      - ./logs:/www/logs:rw,z
    secrets:
      - LDAP_ADMIN_PASSWORD
    environment:
      TIMEZONE: "Europe/Berlin"

      VIRTUAL_HOST: example.com
      VIRTUAL_PORT: 80
      LETSENCRYPT_HOST: example.com
      LETSENCRYPT_EMAIL: webmaster@example.com

      LDAP_SCHEME: "ldaps"
      LDAP_PORT: 636

      LDAP1_HOST: "ldap"
      LDAP1_TLS: "TRUE"
      LDAP1_BASE_DN: "dc=example,dc=com"
      LDAP1_ADMIN_DN: "cn=admin,dc=example,dc=com"
      LDAP1_ADMIN_PASS: 42
      LDAP1_PORT: 636
      LDAP1_NAME: LDAP
    networks:
      - nginx-proxy
      - ldap
    restart: always

The error i get is: TLS: hostname does not match CN in peer certificate, while operating on '' using LDAP server 'ldaps://ldap:636')'.

Any ideas?