Original Submission Hi Tuleap folks,
Currently, there is no way of connecting to an LDAP/Active Directory Directory Server using TLS-Encrypted LDAP (using start_tls).
I'm no php/ldap expert, but I was able to come up with a short-term workaround. I modified plugins/ldap/include/LDAP.class.php to always use `ldap_start_tls`:
======
--- LDAP.class.php.orig 2018-06-11 11:20:59.000000000 -0400
+++ LDAP.class.php.start_tls 2018-06-11 16:02:42.000000000 -0400
@@ -154,6 +154,8 @@
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
+ ldap_start_tls($ds);
+
// Since ldap_connect always return a resource with
// OpenLdap 2.2.x, we have to check that this ressource is
// valid with a bind, If bind success: that's great, if
@@ -196,6 +198,8 @@
$this->bound = false;
}
+ ldap_start_tls($this->ds);
+
if ($bind_result = @ldap_bind($this->ds, $binddn, $bindpw)) {
$this->bound = true;
} else {
======
... and works (but only because the _only_ server I'm connecting to requires TLS encryption). I don't recommend this as a general fix.
I'm running:
CentOS 6.9
tuleap 10.1.99.104
php 5.3.3
Thanks,
Marek