Forum

Encryption selectio...
 
Notifications
Retirer tout

Encryption selection mode for LDAP queries is missing

2 Posts
2 Utilisateurs
0 Reactions
2,193 Vu
(@postman76)
Posts: 6
Active Member
Début du sujet
 
[#5678]

Hi,

I'm strugling to get TLS encrypted connection to our LDAP server, where it looks that this feature is totally missing from the code.

I believe code supports encryption mode selection only between non-encrypted and SSL-encrypted connections which is normally done via port number.
But SSL encryption has not been anymore recommended for at least couple of years now and recommended way should be done with TLS encryption which is done via port 389 (yes the same than non-encrypted)

So for the file called UserMain.php (at Model folder) there should be some kind of trying code for TLS encryption as well. My educated guess is that this "try" should go to the code in line 1183 and could be following somehow ini example below:

$ldap_URI = "ldap://ldap.example.com/" ;
$ldap_bind_dn = "cn=myapplication,ou=service accounts,dc=example,dc=com" ;
$ldap_bind_dn_password = "hopefully something long and complicated" ;
$ldap_connection = ldap_connect($ldap_URI) ;
if(ldap_start_tls($ldap_connection)){
    if(!ldap_bind($ldap_connection,$ldap_bind_dn,$ldap_bind_dn_password)) ;
    //TODO: return/throw some error/exception here to be handled by caller, regarding invalid credentials
}else{
    ldap_close($ldap_connection);
    //TODO: return/throw some error/exception here to be handled by caller, regarding starttls failure
}

Even better way would be that there will be setting for the admin (in area where LDAP settings are defined) that there would be ecnryption settings available a good example how this could be done is from tool called webmin, take a look the pic below:


 
Posté : 13 Jan PM 16:011
(@babynus)
Posts: 14952
Membre Admin
 

This is subject of ticket #3103.
I added your remarks an proposal as note on the ticket.


 
Posté : 16 Jan PM 18:011
Share:
Retour en haut