Bug 1339233 - CA installed on replica is always marked as renewal master
Summary: CA installed on replica is always marked as renewal master
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Kaleem
URL:
Whiteboard:
Keywords: Regression, ZStream
: 1339234 (view as bug list)
Depends On:
Blocks: 1339304
TreeView+ depends on / blocked
 
Reported: 2016-05-24 12:44 UTC by Martin Bašti
Modified: 2016-11-04 05:54 UTC (History)
6 users (show)

(edit)
Clone Of:
: 1339304 (view as bug list)
(edit)
Last Closed: 2016-11-04 05:54:20 UTC


Attachments (Terms of Use)
console.log (14.01 KB, text/plain)
2016-07-26 11:06 UTC, Abhijeet Kasurde
no flags Details
ipa-server-install.log (3.91 MB, text/plain)
2016-07-26 11:07 UTC, Abhijeet Kasurde
no flags Details
ipa-replica-install-1.log (3.96 MB, text/plain)
2016-07-26 11:08 UTC, Abhijeet Kasurde
no flags Details
ipa-replica-install-2.log (3.96 MB, text/plain)
2016-07-26 11:09 UTC, Abhijeet Kasurde
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2404 normal SHIPPED_LIVE ipa bug fix and enhancement update 2016-11-03 13:56:18 UTC

Description Martin Bašti 2016-05-24 12:44:40 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/5902

When doing installation of clone CA on a replica, the {{{cn=CA,cn=$FQDN,cn=masters,cn=ipa,cn=etc,$SUFFIX}} entry of freshly installed master is always marked as 'caRenewalMaster'. This means that there are multiple CA renewal masters in topology which can cause great problems when renewing certificates nearing expiration.

Steps to reproduce:

1.) install IPA master

2.) create either domain level 0 or 1 replica w/ CA, or do a standalone CA install on the replica

3.) Search for 'ipaConfigString=caRenewalMaster' attribute:

{{{
$ ldapsearch -Y GSSAPI -b 'cn=masters,cn=ipa,cn=etc,$SUFFIX' '(ipaConfigString=caRenewalMaster)'
}}}

Expected result:

the search returns one entry corresponding to the CA renewal:
{{{
SASL/GSSAPI authentication started
SASL username: admin@IPA.TEST
SASL SSF: 56
SASL data security layer installed.
# extended LDIF
#
# LDAPv3
# base <cn=masters,cn=ipa,cn=etc,dc=ipa,dc=test> with scope subtree
# filter: (ipaConfigString=caRenewalMaster)
# requesting: ALL
#

...

# numEntries: 1
}}}

Actual result:

After installing CA replica two entries with 'ipaConfigString=caRenewalMaster' are present.

{{{
SASL/GSSAPI authentication started
SASL username: admin@IPA.TEST
SASL SSF: 56
SASL data security layer installed.
# extended LDIF
#
# LDAPv3
# base <cn=masters,cn=ipa,cn=etc,dc=ipa,dc=test> with scope subtree
# filter: (ipaConfigString=caRenewalMaster)
# requesting: ALL
#

...

# numEntries: 2
}}}

This happens due to the code unconditionally setting {{{ipaConfigString=caRenewalMaster}}} on new CA instances on two places:

here during domain level 1 replica install (ipa-4-3 and master only):

https://git.fedorahosted.org/cgit/freeipa.git/tree/ipaserver/install/cainstance.py#n1291

here during CA install regardless of domain level (ipa-4-2, ipa-4-3, and master):

https://git.fedorahosted.org/cgit/freeipa.git/tree/ipaserver/install/ca.py#n191


Reproduced on CentOS 7 using ipa-server-4.2.0-15.0.1.el7.centos.6.1.x86_64 and also on Fedora 23 using freeipa-server-4.3.1-1.fc23.x86_64 in both domain levels (see links to the code above).

Comment 1 Jan Cholasta 2016-05-24 12:46:44 UTC
*** Bug 1339234 has been marked as a duplicate of this bug. ***

Comment 8 Abhijeet Kasurde 2016-07-26 11:06:26 UTC
Verified using IPA ::

ipa-server-4.4.0-3.el7.x86_64


Steps taken to verify ::

1. Install IPA Master 
2. Run command - 

ldapsearch -Y GSSAPI -b "cn=masters,cn=ipa,cn=etc,$SUFFIX" '(ipaConfigString=caRenewalMaster)'

3. Install IPA replica 
4. Run command on Master - 

ldapsearch -Y GSSAPI -b "cn=masters,cn=ipa,cn=etc,$SUFFIX" '(ipaConfigString=caRenewalMaster)'

5. Install another IPA replica
6. Run command on Master - 

ldapsearch -Y GSSAPI -b "cn=masters,cn=ipa,cn=etc,$SUFFIX" '(ipaConfigString=caRenewalMaster)'

7. Verify each time after adding Replica 'caRenewalMaster' entry should remain to one.

Comment 9 Abhijeet Kasurde 2016-07-26 11:06 UTC
Created attachment 1184181 [details]
console.log

Comment 10 Abhijeet Kasurde 2016-07-26 11:07 UTC
Created attachment 1184182 [details]
ipa-server-install.log

Comment 11 Abhijeet Kasurde 2016-07-26 11:08 UTC
Created attachment 1184183 [details]
ipa-replica-install-1.log

Comment 12 Abhijeet Kasurde 2016-07-26 11:09 UTC
Created attachment 1184184 [details]
ipa-replica-install-2.log

Comment 14 errata-xmlrpc 2016-11-04 05:54:20 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.

https://rhn.redhat.com/errata/RHBA-2016-2404.html


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