10.4. 配置 ACME Realm
本节描述了如何为 PKI ACME 响应器 配置域。realm 配置位于 /etc/pki/pki-tomcat/acme/realm.conf
。
您可以使用 pki-server acme-realm-mod
命令通过命令行配置 ACME Realm。
在没有参数的情况下调用此命令会启动一个互动模式,例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow pki-server acme-realm-mod
$ pki-server acme-realm-mod The current value is displayed in the square brackets. To keep the current value, simply press Enter. To change the current value, enter the new value. To remove the current value, enter a blank space. Enter the type of the realm. Available types: ds. Database Type: ds Enter the location of the LDAP server (e.g. ldap://localhost.localdomain:389). Server URL [ldap://localhost.localdomain:389]: Enter the authentication type. Available types: BasicAuth, SslClientAuth. Authentication Type [BasicAuth]: Enter the bind DN. Bind DN [cn=Directory Manager]: Enter the bind password. Bind Password [ ****** ]: Enter the base DN for the ACME users subtree. Users DN [ou=people,dc=acme,dc=pki,dc=example,dc=com]: Enter the base DN for the ACME groups subtree. Groups DN [ou=groups,dc=acme,dc=pki,dc=example,dc=com]:
-
使用--
type
参数调用 命令会根据指定的类型创建新的配置。 - 使用其他参数调用 命令会更新指定的参数。
10.4.1. 配置 DS Realm
您可以将 PKI ACME Responder 配置为使用目录服务器域。DS Realm 的示例配置位于 /usr/share/pki/acme/realm/ds/realm.conf
。
配置目录服务器域:
-
为 DS 中的 ACME 用户和组准备子树。示例 LDIF 文件位于
/usr/share/pki/acme/realm/ds/create.ldif]
。本例使用dc=acme,dc=pki,dc=example,dc=com
作为基本 DN。 使用
ldapadd
命令导入 LDIF 文件:Copy to Clipboard Copied! Toggle word wrap Toggle overflow ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \ -f /usr/share/pki/acme/realm/ds/create.ldif
$ ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \ -f /usr/share/pki/acme/realm/ds/create.ldif
将
/usr/share/pki/acme/realm/ds/realm.conf
示例配置文件复制到/etc/pki/pki-tomcat/acme
目录中,或者运行以下命令来自定义某些参数:Copy to Clipboard Copied! Toggle word wrap Toggle overflow pki-server acme-realm-mod --type ds \ -DbindPassword=Secret.123
$ pki-server acme-realm-mod --type ds \ -DbindPassword=Secret.123
根据需要自定义配置:
在独立 ACME 部署中,
realm.conf
文件应类似如下:Copy to Clipboard Copied! Toggle word wrap Toggle overflow class=org.example.acme.realm.DSRealm url=ldap://<hostname>:389 authType=BasicAuth bindDN=cn=Directory Manager bindPassword=Secret.123 usersDN=ou=people,dc=acme,dc=pki,dc=example,dc=com groupsDN=ou=groups,dc=acme,dc=pki,dc=example,dc=com
class=org.example.acme.realm.DSRealm url=ldap://<hostname>:389 authType=BasicAuth bindDN=cn=Directory Manager bindPassword=Secret.123 usersDN=ou=people,dc=acme,dc=pki,dc=example,dc=com groupsDN=ou=groups,dc=acme,dc=pki,dc=example,dc=com
在共享 CA 和 ACME 部署中,
realm.conf
文件应类似如下:Copy to Clipboard Copied! Toggle word wrap Toggle overflow class=org.example.acme.realm.DSRealm configFile=conf/ca/CS.cfg usersDN=ou=people,dc=ca,dc=pki,dc=example,dc=com groupsDN=ou=groups,dc=ca,dc=pki,dc=example,dc=com
class=org.example.acme.realm.DSRealm configFile=conf/ca/CS.cfg usersDN=ou=people,dc=ca,dc=pki,dc=example,dc=com groupsDN=ou=groups,dc=ca,dc=pki,dc=example,dc=com