第 13 章 IdM 离线时续订过期的系统证书

如果系统证书已过期,Identity Management(IdM)无法启动。IdM 支持使用 ipa-cert-fix 工具更新系统证书。

先决条件

  • IdM 仅安装在 Red Hat Enterprise Linux 8.1 或更高的版本上。
  • 通过在主机上输入 ipactl start --ignore-service-failures 命令来确保 LDAP 服务正在运行。

13.1. 在 CA 续订服务器上续订过期的系统证书

按照以下流程,对过期的 IdM 证书应用 ipa-cert-fix 工具。

重要

如果您在不是 CA 续订服务器的 CA(证书授权机构)主机上运行 ipa-cert-fix 工具,并且 实用程序续订共享证书,则该主机会自动成为域中的新 CA 续订服务器。域中必须始终只有一个 CA 续订服务器,以避免不一致。

先决条件

  • 使用管理权限登录到服务器

流程

  1. (可选)备份系统。这强烈推荐,因为 ipa-cert-fixnssdb 进行了不可逆更改。因为 ipa-cert-fix 也对 LDAP 进行了更改,因此也建议备份整个集群。
  2. 启动 ipa-cert-fix 工具,以分析系统并列出需要续订的过期证书:

    # ipa-cert-fix
    ...
    The following certificates will be renewed:
    
    Dogtag sslserver certificate:
      Subject: CN=ca1.example.com,O=EXAMPLE.COM 201905222205
      Serial:  13
      Expires: 2019-05-12 05:55:47
    ...
    Enter "yes" to proceed:
  3. 输入 yes 以开始续订过程:

    Enter "yes" to proceed: yes
    Proceeding.
    Renewed Dogtag sslserver certificate:
      Subject: CN=ca1.example.com,O=EXAMPLE.COM 201905222205
      Serial:  268369925
      Expires: 2021-08-14 02:19:33
    ...
    
    Becoming renewal master.
    The ipa-cert-fix command was successful

    ipa-cert-fix 更新所有过期证书前最多可能需要一分钟的时间。

  4. (可选)验证所有服务现在是否都在运行:

    # ipactl status
    Directory Service: RUNNING
    krb5kdc Service: RUNNING
    kadmin Service: RUNNING
    httpd Service: RUNNING
    ipa-custodia Service: RUNNING
    pki-tomcatd Service: RUNNING
    ipa-otpd Service: RUNNING
    ipa: INFO: The ipactl command was successful

此时,证书已被续订,服务正在运行。下一步是检查 IdM 域中的其他服务器。

注意

如果您需要在多个 CA 服务器之间修复证书:

  1. 在确保 LDAP 复制功能拓扑后,首先根据上述步骤在一个 CA 服务器中运行 ipa-cert-fix
  2. 在另一个 CA 服务器上运行 ipa-cert-fix 之前,请通过 getcert-resubmit (在其他 CA 服务器上)触发共享证书的 Certmonger 续订,以避免不必要的续订共享证书。