* Tim van Dijen <
tvd...@gmail.com> [2021-06-23 16:37]:
> I can tell you from experience that using the OpenLDAP certificate
> store is really inconvenient when you have multiple certs from
> multiple CAs.
What's "the OpenLDAP certificate store"? Do you mean the default paths
an OS vendor may have set where the OpenLDAP libraries look for CA
certificates?
> You can just add the certificate(-chain) to the OS trust store..
Simply finding (or pointing out, from the perspective of the
documentation) the right place to configure this would be sufficient,
IMO.
And I might prefer not trust the private CA from the LDAP service on
the global/OS level.
> In my case (RHEL & CentOS), I put the cert or chain in
> /etc/pki/ca-trust/source/anchors (make sure to use base64 /
> PEM-format). Then I run 'update-ca-trust force-enable' followed by
> 'update-ca-trust extract'. Finally you restart php-fpm or httpd
> depending on your setup.
On RHEL & CentOS the file to configure alternative locations for the
trust store would be /etc/openldap/ldap.conf, from a quick web search.
> Other OS'es may work differently
On Debian, Ubuntu & friends it's /etc/ldap/ldap.conf.
In all cases pointing TLS_CACERT to the trunst anchor your LDAP server
uses for LDAPS/LDAP+STARTTLS would suffice.
(On platforms not linking OpenLDAP against GnuTLS you could also use
TLS_CACERTDIR but that's more involved that pointing to a single file,
and again, doesn't work everywhere.)
> this is exactly the reason this is not documented on the SSP side.
To me the fact that we have to talk about this and share examples
clearly illustrates why this should to be documented (if only by
reference to a usable external resource, if one exists). ;)
What could always be said (and would have helped the OP) is:
* what needs to be done (point TLS_CACERT to the trust anchor;
maybe explain or reference something that explains what the trust
anchor is/should be),
* where this needs to be done (pointing to `man ldap.conf` of the
OS/distribution; Debian's man pages are)
-peter