1.10.4. 使用传统核心管理身份验证配置域和主机控制器之间的 SSL/TLS
当您将 SSL/TLS 配置为在受管域中的 JBoss EAP 实例之间使用时,每个实例都可以具有客户端或服务器角色,具体取决于交互。这包括所有主机控制器和域控制器。因此,建议您在端点之间设置双向 SSL/TLS。
您可以在受管域中配置 JBoss EAP 实例,以便在主域控制器和主机控制器之间互相通信时使用 SSL/TLS。要使用传统核心管理身份验证来执行此操作,请使用以下步骤:
生成和配置所有必要的证书和密钥存储。
为了在端点之间设置双向 SSL/TLS,您需要为主域控制器和每一主机控制器生成和配置证书和密钥存储。您还需要将主控域控制器的证书导入到每一主机控制器的密钥存储中,并将每一主机控制器的证书导入到主控域控制器的密钥存储中。使用传统核心管理身份验证的管理接口设置双向 SSL/TLS 中介绍了此流程的细节。
将主域控制器配置为使用 SSL/TLS。
配置了所有证书和密钥存储后,您需要配置安全域以使用双向 SSL/TLS。这可以通过将安全域配置为使用 SSL/TLS 来完成,并需要它进行身份验证。该安全域随后用于保护用于主机控制器和主控域控制器之间的连接的管理接口。
注意下列命令必须以批处理模式运行,或者必须在添加ssl 服务器身份后重新加载服务器。以下示例使用批处理模式进行演示。
batch /host=master/core-service=management/security-realm=CertificateRealm:add() /host=master/core-service=management/security-realm=CertificateRealm/server-identity=ssl:add(alias=domaincontroller,keystore-relative-to=jboss.domain.config.dir,keystore-path=domaincontroller.jks,keystore-password=secret) /host=master/core-service=management/security-realm=CertificateRealm/authentication=truststore:add(keystore-relative-to=jboss.domain.config.dir,keystore-path=domaincontroller.jks,keystore-password=secret) /host=master/core-service=management/security-realm=CertificateRealm/authentication=local:add(default-user=\$local) /host=master/core-service=management/security-realm=CertificateRealm/authentication=properties:add(relative-to=jboss.domain.config.dir,path=mgmt-users.properties) /host=master/core-service=management/management-interface=http-interface:write-attribute(name=security-realm,value=CertificateRealm) run-batch将所有主机控制器配置为使用 SSL/TLS。
将主域控制器配置为使用双向 SSL/TLS 后,您需要将每一主机控制器配置为使用它。进程与主域控制器配置非常相同,但您需要使用特定于每一主机的密钥存储。
注意下列命令必须以批处理模式运行,或者必须在添加ssl 服务器身份后重新加载服务器。以下示例使用批处理模式进行演示。
batch /host=instance1/core-service=management/security-realm=CertificateRealm:add() /host=instance1/core-service=management/security-realm=CertificateRealm/server-identity=ssl:add(alias=instance1,keystore-relative-to=jboss.domain.config.dir,keystore-path=instance1.jks,keystore-password=secret) /host=instance1/core-service=management/security-realm=CertificateRealm/authentication=truststore:add(keystore-relative-to=jboss.domain.config.dir,keystore-path=instance1.jks,keystore-password=secret) /host=instance1/core-service=management/security-realm=CertificateRealm/authentication=local:add(default-user="\$local") /host=instance1/core-service=management/security-realm=CertificateRealm/authentication=properties:add(relative-to=jboss.domain.config.dir,path=mgmt-users.properties) /host=instance1/core-service=management/management-interface=http-interface:write-attribute(name=security-realm,value=CertificateRealm) run-batch此外,您需要更新连接主域控制器时使用的安全域。此更改必须直接在主机控制器的配置文件中执行,如
host.xml 或 host-slave.xml,而服务器未在运行。示例:主机控制器配置文件
<domain-controller> <remote security-realm="CertificateRealm" username="slave-user"> <discovery-options> <static-discovery name="primary" protocol="${jboss.domain.master.protocol:remote}" host="${jboss.domain.master.address}" port="${jboss.domain.master.port:9990}"/> </discovery-options> </remote> </domain-controller>警告红帽建议显式禁用 SSLv2、SSLv3 和 TLSv1.0,以便在所有受影响的软件包中明确禁用 TLSv1.1 或 TLSv1.2。