-
Notifications
You must be signed in to change notification settings - Fork 21
LDAPS not working #24
Comments
Sounds like there is an issue with PHP not trusting certificate that is being offered by the LDAP server. Make sure you are using the hostname that is displayed in the certificate and make sure PHP trusts the end of the certificate chain offered by the LDAP server. PHP and LDAP treat untrusted certificates very harshly and often give back misleading errors. The other option is it ignore disabled PHP certificate checking. This isn't recommended. Currently there is no option to disable LDAPS certificate checking in just this module. If you'd like this please file a feature request for this feature. |
Those accept-to-gettext error look more like ttrss core issues. |
Added issue #25 for the enhancement |
Thanks for the reply and sorry for the long wait, I only recently had time to get back to this issue again. Failed login attempt for myuser from x.x.x.x
E_WARNING (2) classes/db/pgsql.php:70 pg_affected_rows() expects parameter 1 to be resource, boolean given
E_USER_ERROR (256) classes/db/pgsql.php:47 Query INSERT INTO ttrss_error_log (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES (256, 'LDAP bind(): Bind failed ()with DN cn=myorg', '', '', '', NULL, NOW()) failed: ERROR: invalid input syntax for integer: "" ZEILE 3: mybasedn', '', '', '', NU... ^
E_WARNING (2) classes/db/pgsql.php:70 pg_affected_rows() expects parameter 1 to be resource, boolean given
E_USER_ERROR (256) classes/db/pgsql.php:47 Query INSERT INTO ttrss_error_log (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES (1024, 'Array ( [host] => myhost [basedn] => mybasedn [port] => 636 [starttls] => ) ', '', '', '', NULL, NOW()) failed: ERROR: invalid input syntax for integer: "" ZEILE 10: ', '', '', '', NULL, NOW()) ^
|
Hello, I found problem: line 285 in init.php In ldap_connect, the scheme of URI It's missing And line 303, the test is wrong : It must test $this->_scheme not $this->_host |
I'm doing LDAP over TLS via StartTLS and it is working fine. Have you verified that php trusts you LDAP server? PHP treats untrusted LDAP certificate chains very harshly before PHP 7.1. To test it on an standard linux box use the following command: If that doesn't verify the whole chain, you'll probably have LDAPS/StartTLS connection problems but it will error will just be can't connect to server. |
Sorry @Alexconquer, I was looking at the some older code and I hadn't pulled from the master in a while. Another merge broke it. FIxing.. |
This command return "Verification: OK". And others programs : Dovecot, PostFix and OpenXchange are't problem. I add information of my context, i close ldap port and i only open ldaps. |
Hi, logs :
conf :
Without SSL it works just fine |
I had the same problem initially. |
Hi,
I recently configured auth_ldap on my tt-rss instance. Authentication works with LDAP via port 389, but I get Wrong Username or Password when using LDAPS with port 636.
So basically changing
define('LDAP_AUTH_SERVER_URI', 'ldap://my.org');
todefine('LDAP_AUTH_SERVER_URI', 'ldaps://my.org')
makes me unable to log in.I downloaded tt-rss' and auth_ldap's most recent builds from their respective repositories.
I'm running CentOS Linux release 7.2.1511 with php 5.4.
LDAPS Connection to my Active Directory works fine with other applications.
My error log gets flooded with these PHP Notices, it throws a notice for every line in accept-to-gettext.php, but this happens with both LDAP and LDAPS configured (-> tt-rss related most likely):
PHP Notice: Undefined index: in /srv/web/my.org/lib/accept-to-gettext.php on line 150
PHP Notice: Array to string conversion in /srv/web/my.org/include/errorhandler.php on line 24
PHP Notice: Array to string conversion in /srv/web/my.org/include/errorhandler.php on line 24
The text was updated successfully, but these errors were encountered: