-
Type:
Documentation task
-
Resolution: Unresolved
-
Priority:
Major
-
None
-
Affects Version/s: 6.0.49, 7.0.32, 7.4.16, 8.0.0
-
Component/s: Documentation (D)
-
None
-
Support backlog
Steps to reproduce:
It's not mentioned that you can put 2+ servers under Host field for a failover setup: https://www.zabbix.com/documentation/7.0/en/manual/web_interface/frontend_sections/users/authentication/ldap
Zabbix’s LDAP login runs in the frontend, which calls PHP’s ldap_connect(). PHP hands that string straight to OpenLDAP’s ldap_initialize().
PHP: ldap_connect()
- https://www.php.net/manual/en/function.ldap-connect.php
- The manual says the URI is a full LDAP URI of the form ldap://hostname:port or ldaps://hostname:port for SSL encryption. You can also provide multiple LDAP-URIs separated by a space as one string. php
- One caveat: each entry needs its scheme. On PHP 7+, a bare list of IPs fails with “ldap_connect(): Could not create session handle: Bad parameter to an ldap routine”. See https://bugs.php.net/bug.php?id=74788 php
Example to be added:
'Host' field:
ldaps://dc1.example.com:636 ldaps://dc2.example.com:636
Additional notes:
- The Port field is ignored when you use URIs, so put the port in each URI
- Each entry needs a scheme (PHP limit)
- Failover only happens when the connection fails. A bind error or a server that hangs after connecting doesn’t switch to the next URI
- This failover is separate from the “multiple LDAP servers” feature, which assigns a server per user group and has no failover
Reproduce: set two URIs, block port 389/636 to the first host, and log in successfully.
Note: this is a documentation task, please do not break working functionality for a failover, since multiple LDAP cannot provide this.