causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.13k stars 290 forks source link

LDAP with STARTTLS support #1411

Closed francescocarzaniga closed 4 years ago

francescocarzaniga commented 4 years ago
Organizr Version: V 2.0.570
Branch: Master
WebServer: Nginx
Operating System: Solaris

Problem Description:

LDAP integration does not work if the server requires TLS. Other services work fine both with port 636 and 389.


Reproduction Steps:

Set LDAP server to only support secure connections. Set authentication backend as LDAP, type OpenLDAP. Set uri ldaps://\<ldap-host>:636, or ldaps://\<ldap-host>:389, or ldap://\<ldap-host>:389.


Errors on screen? If so paste here:

When using port 389:

API Connection Failed
Confidentiality required

When using port 636:

API Connection Failed
Can't contact LDAP server
francescocarzaniga commented 4 years ago

Setting

$useTLS  = true;

in

api/vendor/adldap2/adldap2/src/Connections/Ldap.php

solves the issue. I image this is intended to be a toggle that has not been implemented yet.

causefx commented 4 years ago

If you are on Dev branch, you can try the latest fix.