Bug 811295 - Installation fails when CN is set in certificate subject base
Installation fails when CN is set in certificate subject base
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.3
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-10 12:12 EDT by Dmitri Pal
Modified: 2015-05-12 07:06 EDT (History)
4 users (show)

See Also:
Fixed In Version: ipa-3.0.0-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Administrators installing Identity Management were able to choose certificate subject base with a Common name (CN) as one component. However, it is illegal to have more than one CN attribute in a certificate subject. Consequence: Identity Management installation crashes. Fix: Do not allow CN attribute in a certificate subject base option. Result: Administrator is warned when he chooses a wrong certificate subject base.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 04:10:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dmitri Pal 2012-04-10 12:12:10 EDT
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2584

The CN attribute is allowed in certificate subject base. However, when it is set, it makes installation fail:

{{{
$ ipa-server-install ... --subject CN=Test

...

Unable to set admin password Command '/usr/bin/ldappasswd -h vm-085.idm.lab.bos.redhat.com -ZZ -x -D cn=Directory Manager -y /var/lib/ipa/tmp3SXnWH -T /var/lib/ipa/tmptPWLlg uid=admin,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com' returned non-zero exit status 1
Configuration of client side components failed!
ipa-client-install returned: Command '/usr/sbin/ipa-client-install --on-master --unattended --domain idm.lab.bos.redhat.com --server vm-085.idm.lab.bos.redhat.com --realm IDM.LAB.BOS.REDHAT.COM --hostname vm-085.idm.lab.bos.redhat.com' returned non-zero exit status 1
}}}

ipaserver-install.log:
{{{
...

2012-03-27T13:08:09Z DEBUG Changing admin password
2012-03-27T13:08:09Z DEBUG args=/usr/bin/ldappasswd -h vm-085.idm.lab.bos.redhat.com -ZZ -x -D cn=Directory Manager -y /var/lib/ipa/tmp3SXnWH -T /var/lib/ipa/tmptPWLlg uid=admin,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
2012-03-27T13:08:09Z DEBUG stdout=
2012-03-27T13:08:09Z DEBUG stderr=ldap_start_tls: Connect error (-11)
        additional info: TLS: hostname does not match CN in peer certificate

2012-03-27T13:08:09Z DEBUG Unable to set admin password Command '/usr/bin/ldappasswd -h vm-085.idm.lab.bos.redhat.com -ZZ -x -D cn=Directory Manager -y /var/lib/ipa/tmp3SXnWH -T /var/lib/ipa/tmptPWLlg uid=admin,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com' returned non-zero exit status 1
2012-03-27T13:08:11Z DEBUG args=/usr/sbin/ipa-client-install --on-master --unattended --domain idm.lab.bos.redhat.com --server vm-085.idm.lab.bos.redhat.com --realm IDM.LAB.BOS.REDHAT.COM --hostname vm-085.idm.lab.bos.redhat.com
2012-03-27T13:08:11Z DEBUG stdout=ESC[?1034hInstallation failed. Rolling back changes.
IPA client is not configured on this system.

2012-03-27T13:08:11Z DEBUG stderr=ipa         : ERROR    LDAP Error: Connect error: TLS: hostname does not match CN in peer certificate
Failed to verify that vm-085.idm.lab.bos.redhat.com is an IPA Server.
This may mean that the remote server is not up or is not reachable
due to network or firewall settings.
}}}

ipaclient-install.log:
{{{
...

2012-03-27T13:08:11Z DEBUG Init ldap with: ldap://vm-085.idm.lab.bos.redhat.com:389
2012-03-27T13:08:11Z ERROR LDAP Error: Connect error: TLS: hostname does not match CN in peer certificate
2012-03-27T13:08:11Z DEBUG will use domain: idm.lab.bos.redhat.com

2012-03-27T13:08:11Z DEBUG will use server: vm-085.idm.lab.bos.redhat.com
}}}
Comment 1 RHEL Product and Program Management 2012-07-10 03:13:06 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 2 RHEL Product and Program Management 2012-07-10 19:27:01 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 3 Martin Kosek 2012-09-18 03:27:37 EDT
Fixed upstream:

master: 390d708e43a71bf45b5a6e168277ebea483f473f - Installation fails when CN is set in certificate subject base

ipa-3-0: 390d708e43a71bf45b5a6e168277ebea483f473f - Installation fails when CN is set in certificate subject base

As having a multiple CNs values in a subject of a certificate is generally discouraged and can cause client issues (like the one reported), it is no longer allowed by ipa-server-install's --subject option.
Comment 5 Kaleem 2012-11-27 01:57:16 EST
Verified.

Now CN attribute is not allowed in subject parameter and error message is displayed.

IPA-Server version:
==================
[root@rhel64master install-server-cli]# rpm -q ipa-server
ipa-server-3.0.0-8.el6.x86_64
[root@rhel64master install-server-cli]#

[root@rhel64master ~]# ipa-server-install --setup-dns --forwarder=10.14.63.12 -r TESTRELM.COM -p xxxxxx -P xxxxxx -a xxxxxx -U --subject CN=Test
Usage: ipa-server-install [options]

ipa-server-install: error: --subject=CN=Test has invalid attribute: "CN"
[root@rhel64master ~]#
Comment 7 errata-xmlrpc 2013-02-21 04:10:52 EST
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-2013-0528.html

Note You need to log in before you can comment on or make changes to this bug.