Connection to directory service is insecure

Issue #10 resolved
viharm repo owner created an issue

Currently the library uses clear unencrypted connection to the directory service.

Enable functionality to connect to LDAP directories using TLS.

ldap over SSL (ldaps) on port 636 is deprecated, so will not be implemented.

Comments (8)

  1. viharm reporter

    Use ldap_start_tls

    AD example from the same page:

    <?php  
       $ldap-link=ldap_connect($ldap-host); 
       $ldapbind=false;
       if(ldap_set_option($ldap-link, LDAP_OPT_PROTOCOL_VERSION, 3))
          if(ldap_set_option($ldap-link, LDAP_OPT_REFERRALS, 0))
             if(ldap_start_tls($ldap-link))
                   $ldapbind = @ldap_bind($ldap-link, $ldap-usr, $ldap-pwd);   
       ldap_close($ldap-link);
    
       if(!$ldapbind)
          echo "ERROR";
       else
          echo "OK";
    ?>
    
  2. viharm reporter
    • changed status to open

    Secure LDAP connection is a crucial feature to ensure best practices and security standards are implemented.

  3. Log in to comment