Issue 6248 - Support multiple CA Cert directories
Summary: Support multiple CA Cert directories
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: Normal normal
Target Milestone: 2.6.0
Assignee: Howard Chu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-11 05:28 UTC by Quanah Gibson-Mount
Modified: 2021-10-25 22:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Quanah Gibson-Mount 2009-08-11 05:28:38 UTC
Full_Name: Quanah Gibson-Mount
Version: 2.4.x
OS: NA
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (75.111.29.239)


Both openssl and gnutls support loading CA certs from multiple directories.  It
would be handy to be able to do this for slapd and the ldap clients.  For
example, zimbra puts its CA certs in /opt/zimbra/conf/ca, but the system it is
installed upon is going to have a different default destination for where its
ldap clients look for CA certs.  By having support for the multiple paths, the
configuration can be adjusted to look in both the system location, and any
number of specialized ones.
Comment 1 Howard Chu 2009-08-11 20:47:29 UTC
quanah@zimbra.com wrote:
> Full_Name: Quanah Gibson-Mount
> Version: 2.4.x
> OS: NA
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (75.111.29.239)
>
>
> Both openssl and gnutls support loading CA certs from multiple directories.  It
> would be handy to be able to do this for slapd and the ldap clients.  For
> example, zimbra puts its CA certs in /opt/zimbra/conf/ca, but the system it is
> installed upon is going to have a different default destination for where its
> ldap clients look for CA certs.  By having support for the multiple paths, the
> configuration can be adjusted to look in both the system location, and any
> number of specialized ones.
>
In light of ITS#5582, this should probably wait until 2.5. I.e., we probably 
also want to require the OpenSSL default paths to be explicitly enabled when 
we allow multiple paths to be configured.

E.g. we could allow "DEFAULT" to be a specially recognized token for enabling 
the default path.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2009-08-13 02:04:49 UTC
moved from Incoming to Software Enhancements
Comment 3 OpenLDAP project 2017-03-27 23:29:08 UTC
See also ITS#5582, ITS#8529, ITS#8586
Comment 4 Quanah Gibson-Mount 2017-03-27 23:29:08 UTC
changed notes
Comment 5 Howard Chu 2021-07-22 13:05:34 UTC
(In reply to Quanah Gibson-Mount from comment #0)
> Full_Name: Quanah Gibson-Mount
> Version: 2.4.x
> OS: NA
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (75.111.29.239)
> 
> 
> Both openssl and gnutls support loading CA certs from multiple directories. 

The OpenSSL docs do not support this assertion.
https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_load_verify_locations.html

Closing this ITS.
Comment 6 Quanah Gibson-Mount 2021-07-22 16:14:02 UTC
Should be possible via https://www.openssl.org/docs/man1.1.1/man3/X509_LOOKUP_add_dir.html

Some discussion on how to do this at https://curl.se/mail/lib-2012-07/0233.html and https://curl.se/mail/lib-2012-07/0284.html
Comment 8 Howard Chu 2021-07-22 19:58:32 UTC
Supporting this will require extra care on the part of the sysadmins. In particular, we currently send a list of the names of every CA cert that was configured, to every client, if client cert authentication is configured.
It would probably be a bad idea to send the hundreds of CAs in the default
cert bundle in that case. It only ever makes sense for an LDAP server to
trust and advertise a very small number of CAs. In particular when client
certs are used for authentication, it doesn't make sense to trust certs
from anywhere other than the CA that's signing the client certs.

Given the small scope of trust, it also doesn't make sense to be picking up trusted CA certs from large numbers of locations.
Comment 9 Howard Chu 2021-07-22 20:08:22 UTC
Added in master
Comment 10 Howard Chu 2021-07-22 20:23:34 UTC
(In reply to Howard Chu from comment #9)
> Added in master

This in particular needs testing on Windows.
Comment 11 Quanah Gibson-Mount 2021-07-22 21:02:21 UTC
Commits: 
  • dfcaa3f0 
by Howard Chu at 2021-07-22T21:07:21+01:00 
ITS#6248 support multiple CAcert dirs
Comment 12 Howard Chu 2021-07-22 22:48:29 UTC
(In reply to Howard Chu from comment #10)
> (In reply to Howard Chu from comment #9)
> > Added in master
> 
> This in particular needs testing on Windows.

Never mind. The function in question, SSL_add_dir_cert_subjects_to_stack,
which we previously excluded on Windows builds, has been well supported
in OpenSSL since 2004. So, no problem with that particular change.
Comment 13 Quanah Gibson-Mount 2021-07-22 23:02:34 UTC
Commits: 
  • ff0defdc 
by Howard Chu at 2021-07-22T23:54:25+01:00 
ITS#6248 fix prev commit tlso_ca_list