Chapter 24. Verifying certificates using IdM Healthcheck
			Learn more about understanding and using the Healthcheck tool in Identity management (IdM) to identify issues with IdM certificates maintained by the certmonger utility.
		
Prerequisites
- The Healthcheck tool is only available in RHEL 8.1 and newer.
24.1. IdM certificates Healthcheck tests
				The Healthcheck tool includes several tests for verifying the status of certificates maintained by certmonger in Identity Management (IdM). For details about certmonger, see Obtaining an IdM certificate for a service using certmonger.
			
This suite of tests checks certificate expiration, validation, trust, and other configuration. Healthcheck can report multiple errors for the same underlying issue.
				You can find these certificate tests under the ipahealthcheck.ipa.certs source in the output of the ipa-healthcheck --list-sources command.
			
- IPACertmongerExpirationCheck
- This test checks expirations in - certmonger.- If an error is reported, the certificate has expired. - If a warning appears, the certificate expires soon. By default, a warning appears if the test is run 28 days or fewer before certificate expiration. - You can configure the number of days in the - /etc/ipahealthcheck/ipahealthcheck.conffile. After opening the file, change the- cert_expiration_daysoption located in the- defaultsection.Note- Certmongerloads and maintains its own view of the certificate expiration. This check does not validate the on-disk certificate.
- IPACertfileExpirationCheck
- This test checks if the certificate file or NSS database have correct access rights configured. This test also checks expiration. Therefore, carefully read the - msgattribute in the error or warning output. The message specifies the problem.Note- This test checks the on-disk certificate. If a certificate is missing or unreadable, Healthcheck returns an error. 
- IPACertNSSTrust
- This test analyzes the trust for certificates stored in the NSS databases. For the expected tracked certificates in the NSS databases, Healthcheck compares the trust to an expected value and raises an error on a non-match.
- IPANSSChainValidation
- 
							This test validates the certificate chain of the NSS certificates. The test executes the certutil -V -u V -e -d [dbdir] -n [nickname]command.
- IPAOpenSSLChainValidation
- This test validates the certificate chain of the OpenSSL certificates. Specifically, Healthcheck executes the following OpenSSL command: - openssl verify -verbose -show_chain -CAfile /etc/ipa/ca.crt [cert file] - openssl verify -verbose -show_chain -CAfile /etc/ipa/ca.crt [cert file]- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- IPARAAgent
- 
							This test compares the certificate on disk with the equivalent record in LDAP in uid=ipara,ou=People,o=ipaca.
- IPACertRevocation
- 
							This test verifies that certificates that are maintained by certmongerhave not been revoked.
- IPACertmongerCA
- This test verifies the - certmongerCertificate Authority (CA) configuration. IdM cannot issue certificates without a CA.- Certmongermaintains a set of CA helpers. A CA named- IPAissues certificates for hosts or services through IdM, authenticating as a host or user principal.- There are also - dogtag-ipa-ca-renew-agentand- dogtag-ipa-ca-renew-agent-reusethat renew the CA subsystem certificates.
24.2. Screening certificates using the Healthcheck tool
Follow this procedure to run a standalone manual test of an Identity Management (IdM) certificate health check using the Healthcheck tool.
Prerequisites
- 
						You have rootprivileges.
Procedure
- Enter: - ipa-healthcheck --source=ipahealthcheck.ipa.certs --failures-only - # ipa-healthcheck --source=ipahealthcheck.ipa.certs --failures-only- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The - --source=ipahealthcheck.ipa.certsoption ensures that IdM Healthcheck only performs the- certmongercertificate tests.- Successful test displays empty brackets: - [] - []- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Failed test shows you the following output: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 - This - IPACertfileExpirationChecktest failed on opening the NSS database.
Run this suite of Healthcheck tests on all IdM servers when trying to check for issues.