-
-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Environment:
- LDAP Server Type: OpenLDAP
- PHP Version: 8.1.27 (built-in) of elabftw v5.0.4 image
Describe the bug:
elabftw uses LdapRecord as its library to enable LDAP-based SSO. In our case, the LDAP server needs to be connected with ldaps://LDAPSERVER:636 (for security reasons I've redacted the actual hostname of the LDAP server).
No matter which settings we use in elabftw, as soon as we change the port to 636 the connection string generated by LdapRecord starts with ldap:// and the handshake with our LDAP server fails. As a very hacky workaround, we patch the source code of LdapRecord by replacing
public const PROTOCOL = 'ldap://
with
public const PROTOCOL = 'ldaps://
in LdapInterface.php. We believe there should be a more sustainable way of achieving an ldaps:// connection string from elabftw.
For reference, here are some discussions in elabftw's repo that have already talked about the issue without finally resolving it: elabftw/elabftw#2787, elabftw/elabftw#3242
Also pinging @NicolasCARPi for assistance 😄
Thank you for your assistance!