Bug 2132047

Summary: Check hidden status for PKINIT certificate creation
Product: Red Hat Enterprise Linux 8 Reporter: Aleksandr Sharov <asharov>
Component: ipaAssignee: Florence Blanc-Renaud <frenaud>
Status: NEW --- QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: low    
Version: 8.6CC: rcritten, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Aleksandr Sharov 2022-10-04 13:57:23 UTC
Description of problem:
ipa-pkinit-manage disable > remove kdc cert > ipa-pkinit-manage enable solution doesn't work correctly for hidden replica, because IPA doesn't consider replica status for this process, and hidden replica isn't a public KDC.

Version-Release number of selected component (if applicable):
ipa-server-common-4.9.8-7.module+el8.6.0+14337+19b76db2.noarch
certmonger-0.79.13-5.el8.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install replica
2. Make it hidden with # ipa server-state $HOSTNAME --state=hidden
3. Try to renew cert, either with certmonger resumbission or ipa-pkinit-manage disable > remove kdc cert > pkinit enable 

Actual results: 
You end up with self-signed certificate even for replica with CA. 

Expected results:
Either get an informative error (proposing using ipa server-state $HOSTNAME --state=active to do the same) or request the cert from other PKIs

Additional info: