Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
ipa-healthcheck is complaining about a mismatch between certificates in LDAP and the associated ones in NSS DB.
For instance:
# ipa-healthcheck --debug --verbose --failures-only
...
{
"source": "ipahealthcheck.ipa.certs",
"check": "IPADogtagCertsMatchCheck",
"result": "ERROR",
"uuid": "9983f519-26c6-4098-a11c-d7ccbf906176",
"when": "20220307071047Z",
"duration": "68.469356",
"kw": {
"key": "ocspSigningCert cert-pki-ca",
"nickname": "ocspSigningCert cert-pki-ca",
"dbdir": "/etc/pki/pki-tomcat/alias",
"msg": "{nickname} certificate in NSS DB {dbdir} does not match entry in LDAP"
}
...
#
Version-Release number of selected component (if applicable):
$ grep ipa-healthcheck <SOS_REPORT>/installed-rpms
ipa-healthcheck-0.7-6.module+el8.5.0+11410+91a33fe4.noarch Tue Dec 7 10:21:52 2021
ipa-healthcheck-core-0.7-6.module+el8.5.0+11410+91a33fe4.noarch Tue Dec 7 10:20:23 2021
$
$ cat <SOS_REPORT>/etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)
$
How reproducible:
Always on the customer site.
Steps to Reproduce:
Run this ipa-healthcheck command:
# ipa-healthcheck --debug --verbose --failures-only
Actual results:
The tool reports that there is a mismatch between the certificates in LDAP and NSS DB.
Expected results:
Provide more information ( eg: the LDAP DN of the certificate being compared ) in debug or verbose mode.
Additional info:
1) There are 3 LDAP entries for the certificate "OCSP Subsystem" and one of them is matching the data in the NSS DB.
==> Does the tool compare all relevant certificates in LDAP with the one in the NSS DB?
2) There are almost 20K certificates under "ou=certificateRepository,ou=ca,o=ipaca".
==> Any time or size limit being applied?
Comment 2Florence Blanc-Renaud
2022-03-22 08:34:54 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 -----
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
Description of problem: ipa-healthcheck is complaining about a mismatch between certificates in LDAP and the associated ones in NSS DB. For instance: # ipa-healthcheck --debug --verbose --failures-only ... { "source": "ipahealthcheck.ipa.certs", "check": "IPADogtagCertsMatchCheck", "result": "ERROR", "uuid": "9983f519-26c6-4098-a11c-d7ccbf906176", "when": "20220307071047Z", "duration": "68.469356", "kw": { "key": "ocspSigningCert cert-pki-ca", "nickname": "ocspSigningCert cert-pki-ca", "dbdir": "/etc/pki/pki-tomcat/alias", "msg": "{nickname} certificate in NSS DB {dbdir} does not match entry in LDAP" } ... # Version-Release number of selected component (if applicable): $ grep ipa-healthcheck <SOS_REPORT>/installed-rpms ipa-healthcheck-0.7-6.module+el8.5.0+11410+91a33fe4.noarch Tue Dec 7 10:21:52 2021 ipa-healthcheck-core-0.7-6.module+el8.5.0+11410+91a33fe4.noarch Tue Dec 7 10:20:23 2021 $ $ cat <SOS_REPORT>/etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa) $ How reproducible: Always on the customer site. Steps to Reproduce: Run this ipa-healthcheck command: # ipa-healthcheck --debug --verbose --failures-only Actual results: The tool reports that there is a mismatch between the certificates in LDAP and NSS DB. Expected results: Provide more information ( eg: the LDAP DN of the certificate being compared ) in debug or verbose mode. Additional info: 1) There are 3 LDAP entries for the certificate "OCSP Subsystem" and one of them is matching the data in the NSS DB. ==> Does the tool compare all relevant certificates in LDAP with the one in the NSS DB? 2) There are almost 20K certificates under "ou=certificateRepository,ou=ca,o=ipaca". ==> Any time or size limit being applied?