DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
483 stars 51 forks source link

[Support] - Can't Connect Thru LDAP SSL/LDAPS #616

Closed hans0801 closed 5 months ago

hans0801 commented 6 months ago

Environment:

Hi @stevebauman ,

I tried for use LDAP SSL based on your configuration page on this [https://ldaprecord.com/docs/core/v3/configuration/#debugging]

What I Did: 1) Add syntax "TLS_REQCERT never" to my ldap.conf file then restart my Mac Laptop => Failed with error Error Message Reason: Can't contact LDAP server 2) Tried connect thru LDAP (389) => this worked like a charm.

Here is my Config .env file:

LDAP_HOST=MyOwnlab.my.id LDAP_USERNAME="CN=IT Admin,OU=IT Directorate,OU=MyOwnlab.my.id,DC=MyOwnlab,DC=my,DC=id" LDAP_PASSWORD=XXXXXXX LDAP_PORT=389 LDAP_BASE_DN="OU=Users,OU=MyOwnlab.my.id,DC=MyOwnlab,DC=my,DC=id" LDAP_TIMEOUT=5 LDAP_SSL=true LDAP_TLS=false

Thanks in advance.

stevebauman commented 6 months ago

Hi @hans0801,

  1. Are you sure that SSL or TLS connectivity is enabled on your LDAP server? Do you have any other applications connected to the LDAP server over TLS or SSL? The error message you're seeing is a general connectivity error, meaning the default SSL port (636) isn't being responded to.

  2. Can you try enabling LDAP_TLS instead of LDAP_SSL? This uses the default port 389, but upgrades the connection to TLS.

  3. Can you run php artisan ldap:test, and paste the response here? It includes the diagnostic error code as well as the full error message.

stevebauman commented 5 months ago

Closing due to inactivity.