Bug 1795890

Summary: ipa-pkinit-manage enable fails on replica if it doesn't host the CA
Product: Red Hat Enterprise Linux 7 Reporter: rmitra
Component: ipaAssignee: Florence Blanc-Renaud <frenaud>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.7CC: myusuf, pasik, pcech, rcritten, ssidhaye, sumenon, tscherf
Target Milestone: rcKeywords: TestCaseProvided
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ipa-4.6.6-12.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:58:31 UTC Type: Bug
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: 1788833    

Comment 3 Florence Blanc-Renaud 2020-01-29 18:22:29 UTC
Issue reproduce with the following scenario on RHEL 7.7:
1. install IPA server with embedded CA
2. install replica without CA
At this point the replica ha PKINIT enabled.
3. disable pkinit on the replica with ipa-pkinit-manage disable
4. try to re-enable pkinit on the replica with ipa-pkinit-manage enable
The command fails with 

# ipa-pkinit-manage enable
Configuring Kerberos KDC (krb5kdc)
  [1/1]: installing X509 Certificate for PKINIT
PKINIT certificate request failed: Certificate issuance failed (CA_UNREACHABLE: Error 7 connecting to https://vm-151.abc.idm.lab.eng.brq.redhat.com:8443/ca/ee/ca/profileSubmitSSLClient: Couldn't connect to server.)
Failed to configure PKINIT
Full PKINIT configuration did not succeed
The setup will only install bits essential to the server functionality
You can enable PKINIT after the setup completed using 'ipa-pkinit-manage'
Done configuring Kerberos KDC (krb5kdc).
The ipa-pkinit-manage command was successful

If I apply the patch, the command succeeds, meaning we missed to backport the patch to ipa-4-6 branch.

Comment 5 Florence Blanc-Renaud 2020-01-30 09:14:59 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7795

Comment 6 Florence Blanc-Renaud 2020-01-30 09:22:00 UTC
Fixed upstream:
master:

    7785210 pkinit enable: use local dogtag only if host has CA
    64be314 ipatests: add integration test for pkinit enable on replica
    6589837 pkinit setup: fix regression on master install
    a25de95 test: add non-reg test checking pkinit after server install

ipa-4-7:

    20b0a7a pkinit enable: use local dogtag only if host has CA
    3636460 ipatests: add integration test for pkinit enable on replica
    fcf3fd7 test: add non-reg test checking pkinit after server install
    acc3849 pkinit setup: fix regression on master install

Comment 14 errata-xmlrpc 2020-09-29 19:58:31 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 (Moderate: ipa security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2020:3936