Bug 742023

Summary: Default SSL certificate bundle is not found by openldap library
Product: Red Hat Enterprise Linux 6 Reporter: advax
Component: openldapAssignee: Jan Vcelak <jvcelak>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: dspurek, jplans, jvcelak, ovasik, tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: openldap-2.4.23-26.el6 Doc Type: Bug Fix
Doc Text:
- client establishes TLS connection to a remote server, which has a certificate issued by a commonly trusted CA - server certificate is rejected because the CA certificate cannot be found - during the package installation, certificate database is created and a module with trusted root CA is loaded into it, default configuration uses this certificate database - after default installation, client can establish TLS connection to a remote server, which has a certificate issued by a commonly trusted CA; trusted CA shipped with Mozilla NSS package are used
Story Points: ---
Clone Of:
: 789088 (view as bug list) Environment:
Last Closed: 2012-06-20 07:28:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 789088    

Description advax 2011-09-28 19:45:59 UTC
Description of problem:

openldap clients e.g. ldapsearch and software linked with openldap libraries e.g. Apache mod_authnz_ldap fail to connect to servers when using TLS

Version-Release number of selected component (if applicable):

openldap-2.4.23-15.el6_1.3.x86_64

How reproducible:

Always

Steps to Reproduce:
1. ldapsearch -x -H ldaps://ldap.example.com  -b dc=example -Z "cn=joe" cn
  
Actual results:
ldap_start_tls: Connect error
  additional info: TLS error -8172

Expected results:
cn: User, Joe


Additional info:

The config file /etc/openldap/ldap.conf packaged with openldap does not contain an entry for the certificate bundle e.g. ca-certificates-2010.63-3.el6_1.5.noarch shipped with RHEL6
Adding an entry
  TLS_CACERT /etc/pki/tls/certs/ca-bundle.crt
fixes the problem, at least where the server certicate authority is included in the bundle.

In previous versions of RHEL e.g. RHEL5, openldap did not seem to check certificate chains so that a default install worked.

(The Apache module mod_authnz_ldap returns no details in /var/log/httpd/*
which makes diagnosis difficult)

Comment 8 Jan Synacek 2012-03-01 11:04:05 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
- always
- it's not possible to connect to openldap server using certificates
- sample server-side certificates are generated during installation
- it is possible to connect to openldap server using certificates

Comment 9 Jan Vcelak 2012-03-01 12:46:39 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1,4 @@
-- always
+- client establishes TLS connection to a remote server, which has a certificate issued by a commonly trusted CA
-- it's not possible to connect to openldap server using certificates
+- server certificate is rejected because the CA certificate cannot be found
-- sample server-side certificates are generated during installation
+- during the package installation, certificate database is created and a module with trusted root CA is loaded into it, default configuration uses this certificate database
-- it is possible to connect to openldap server using certificates+- after default installation, client can establish TLS connection to a remote server, which has a certificate issued by a commonly trusted CA; trusted CA shipped with Mozilla NSS package are used

Comment 10 David Spurek 2012-04-30 12:04:27 UTC
ldap.conf file is generated bad, default value of TLS_CACERTDIR missing.

Comment 11 Jan Vcelak 2012-04-30 12:16:45 UTC
The fix is incomplete.

Comment 21 errata-xmlrpc 2012-06-20 07:28:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0899.html