Bug 2066308
Summary: | ipa-healthcheck incorrectly complains about mismatching certificates. | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Têko Mihinto <tmihinto> | |
Component: | ipa-healthcheck | Assignee: | Rob Crittenden <rcritten> | |
Status: | CLOSED ERRATA | QA Contact: | ipa-qe <ipa-qe> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 8.5 | CC: | fcami, frenaud, mpolovka, rjeffman, ssidhaye | |
Target Milestone: | rc | Keywords: | Triaged | |
Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | ipa-healthcheck-0.7-12.module+el8.7.0+14713+9764d4cb | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2067213 (view as bug list) | Environment: | ||
Last Closed: | 2022-11-08 09:35:50 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: | 2067213 |
Description
Têko Mihinto
2022-03-21 13:14:12 UTC
The check IPADogtagCertsMatchCheck is reading the certs from ou=certificateRepository,ou=ca,o=ipaca and checks if the tree contains an ldap entry satisfying the 2 following items: - the 'userCertificate' attribute must contain the same value as the cert read from /etc/pki/pki-tomcat/alias (with nickname ocspSigningCert cert-pki-ca) - the 'subjectName' attribute must contain CN=OCSP Subsystem,O=<realm> I think this BZ is a real issue because ipa-healthcheck is hardcoding the expected subject name, but IdM provides an option allowing to customize the subject base of its certificates (with ipa-server-install --subject-base=SUBJECT). The expected subject name should be: CN=OCSP Subsystem,<subject-base> instead of CN=OCSP Subsystem,O=<realm> The subject base can be found in the file /var/lib/ipa/sysupgrade/sysupgrade.state # cat /var/lib/ipa/sysupgrade/sysupgrade.state [certmap.conf] subject_base = O=ALTNAME.TEST,C=OTHER ... The following method can be used to find the subject base: https://github.com/freeipa/freeipa/blob/67488d2342577cd226539c72d2a79362d9736b30/ipaserver/install/dsinstance.py#L1287 from ipaserver.install import dsinstance subject_base = dsinstance.DsInstance().find_subject_base() Relevant code to be fixed in ipa-healthcheck: https://github.com/freeipa/freeipa-healthcheck/blob/b4af69d246a40f099c24d509fcf6e60a6d99c17e/src/ipahealthcheck/ipa/certs.py#L777 ----- 8< ----- expected_nicks_subjects = { 'ocspSigningCert cert-pki-ca': 'CN=OCSP Subsystem,O=%s' % api.env.realm, 'subsystemCert cert-pki-ca': 'CN=CA Subsystem,O=%s' % api.env.realm, 'auditSigningCert cert-pki-ca': 'CN=CA Audit,O=%s' % api.env.realm, 'Server-Cert cert-pki-ca': 'CN=%s,O=%s' % (api.env.host, api.env.realm), } ----- >8 ----- Fixed upstream: a720d10e2c0d901fbc923985f8b7db0ee601fc55 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 (idm:client and idm:DL1 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/RHBA-2022:7540 |