52.3. 在 IdM 中配置 PKINIT
如果您的 IdM 服务器在 PKINIT 被禁用的情况下运行,请使用这些步骤启用它。例如,如果您传递了 ipa-server-install
或 ipa-replica-install
工具和 --no-pkinit
选项,则服务器在禁用了 PKINIT 的情况下运行。
先决条件
- 确保安装了证书颁发机构(CA)的所有 IdM 服务器都在同一域级别上运行。
流程
检查服务器上是否启用了 PKINIT:
# kinit admin Password for admin@IDM.EXAMPLE.COM: # ipa pkinit-status --server=server.idm.example.com 1 server matched ---------------- Server name: server.idm.example.com PKINIT status:enabled ---------------------------- Number of entries returned 1 ----------------------------
如果 PKINIT 被禁用了,您将看到以下输出:
# ipa pkinit-status --server server.idm.example.com ----------------- 0 servers matched ----------------- ---------------------------- Number of entries returned 0 ----------------------------
如果省略了
--server <server_fqdn>
参数,您也可以使用命令来查找所有启用了 PKINIT 的服务器。如果您使用没有 CA 的 IdM:
在 IdM 服务器上,安装签名了 Kerberos 密钥分发中心(KDC)证书的 CA 证书:
# ipa-cacert-manage install -t CT,C,C ca.pem
要更新所有 IPA 主机,请在所有副本和客户端上重复
ipa-certupdate
命令:# ipa-certupdate
使用
ipa-cacert-manage list
命令检查 CA 证书是否已添加。例如:# ipa-cacert-manage list CN=CA,O=Example Organization The ipa-cacert-manage command was successful
使用
ipa-server-certinstall
工具安装外部 KDC 证书。KDC 证书必须满足以下条件:-
它使用通用名称
CN=fully_qualified_domain_name,certificate_subject_base
发布。 -
它包括 Kerberos 主体
krbtgt/REALM_NAME@REALM_NAME
。 它包含 KDC 身份验证的对象标识符(OID):
1.3.6.1.5.2.3.5。
# ipa-server-certinstall --kdc kdc.pem kdc.key # systemctl restart krb5kdc.service
-
它使用通用名称
查看您的 PKINIT 状态:
# ipa pkinit-status Server name: server1.example.com PKINIT status: enabled [...output truncated...] Server name: server2.example.com PKINIT status: disabled [...output truncated...]
如果您带有 CA 证书的 IdM ,请启用 PKINIT,如下所示:
# ipa-pkinit-manage enable Configuring Kerberos KDC (krb5kdc) [1/1]: installing X509 Certificate for PKINIT Done configuring Kerberos KDC (krb5kdc). The ipa-pkinit-manage command was successful
如果您使用 IdM CA,则命令会从 CA 请求 PKINIT KDC 证书。
其它资源
-
ipa-server-certinstall(1)
手册页