Chapter 19. Renewing expired system certificates when IdM is offline
Expired system certificates prevent Identity Management (IdM) services from starting. Administrators use the ipa-cert-fix tool to renew these credentials when the system is offline, ensuring the LDAP service is active before initiating the repair.
19.1. Prerequisites Copy linkLink copied to clipboard!
-
Ensure that the LDAP service is running by entering the
ipactl start --ignore-service-failurescommand on the host.
19.2. Renewing expired system certificates on a CA renewal server Copy linkLink copied to clipboard!
The ipa-cert-fix utility analyzes and renews expired certificates preventing system startup. Create a full system backup before proceeding, as this tool modifies the LDAP database and NSS databases irreversibly.
If you run the ipa-cert-fix tool on a CA (Certificate Authority) host that is not the CA renewal server, and the utility renews shared certificates, that host automatically becomes the new CA renewal server in the domain. There must always be only one CA renewal server in the domain to avoid inconsistencies.
Prerequisites
You must be logged in to the server as the administrator. .Procedure
-
Optional: Backup the system. This is heavily recommended, as
ipa-cert-fixmakes irreversible changes tonssdbs. Becauseipa-cert-fixalso makes changes to the LDAP, it is recommended to backup the entire cluster as well. Start the
ipa-cert-fixtool to analyze the system and list expired certificates that require renewal:ipa-cert-fix
# ipa-cert-fixCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter
yesto start the renewal process:Enter "yes" to proceed: true
Enter "yes" to proceed: trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow It can take up to one minute before
ipa-cert-fixrenews all expired certificates.
-
Optional: Backup the system. This is heavily recommended, as
Verification
Verify that all services are now running:
ipactl status
# ipactl statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow
At this point, certificates have been renewed and services are running. The next step is to check other servers in the IdM domain.
Next steps
If you need to repair certificates across multiple CA servers:
-
After ensuring that LDAP replication is working across the topology, first run
ipa-cert-fixon one CA server, according to the above procedure. -
Before you run
ipa-cert-fixon another CA server, trigger Certmonger renewals for shared certificates viagetcert-resubmit(on the other CA server), to avoid unnecessary renewal of shared certificates.
19.3. Verifying other IdM servers in the IdM domain after renewal Copy linkLink copied to clipboard!
After restoring the renewal server, force a restart of all other domain replicas. Verify that certmonger successfully retrieved the new certificates. If specific replicas remain unreachable, execute ipa-cert-fix locally on those hosts.
Prerequisites
- You must be logged in to the server as the administrator.
Procedure
Restart IdM with the
--forceparameter:ipactl restart --force
# ipactl restart --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow With the
--forceparameter, theipactlutility ignores individual service startup failures. For example, if the server is also a CA with expired certificates, thepki-tomcatservice fails to start. This is expected and ignored because of using the--forceparameter.After the restart, verify that the
certmongerservice renewed the certificates (certificate status says MONITORING):getcert list | egrep '^Request|status:|subject:'
# getcert list | egrep '^Request|status:|subject:'Copy to Clipboard Copied! Toggle word wrap Toggle overflow ipactl restart --force
# ipactl restart --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow It can take some time before
certmongerrenews the shared certificates on the replica.If the server is also a CA, the previous command reports
CA_UNREACHABLEfor the certificate thepki-tomcatservice uses:Request ID '20190522120835': status: CA_UNREACHABLE subject: CN=ca2.example.com,O=EXAMPLE.COM 201905222205 ...Request ID '20190522120835': status: CA_UNREACHABLE subject: CN=ca2.example.com,O=EXAMPLE.COM 201905222205 ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow To renew this certificate, use the
ipa-cert-fixutility:ipa-cert-fix
# ipa-cert-fixCopy to Clipboard Copied! Toggle word wrap Toggle overflow ipactl restart --force
# ipactl restart --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow