3.2. 在域控制器和主机控制器之间配置 SSL/TLS


重要

当您将 SSL/TLS 配置为在受管域中 JBoss EAP 实例之间使用时,每个实例都可以具有客户端或服务器角色,具体取决于交互。这包括所有主机控制器和域控制器。因此,建议您在端点之间设置双向 SSL/TLS。

您可以在受管域中配置 JBoss EAP 实例,以便在主域控制器和主机控制器之间相互通信时使用 SSL/TLS。要做到这一点,您需要执行以下操作:

  1. 生成并配置所有必要的证书和密钥存储。

    要在端点之间设置双向 SSL/TLS,您需要为 master 域控制器以及每个主机控制器生成并配置证书和密钥存储。您还需要将主域控制器的证书导入到每个主机控制器的密钥存储中,并将每个主机控制器的证书导入到主域控制器的密钥存储中。此过程的具体内容包括在为 管理接口设置双Way SSL/TLS 中。

  2. 将 master 域控制器配置为使用 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=native-interface:write-attribute(name=security-realm,value=CertificateRealm)
    
    run-batch
  3. 将所有主机控制器配置为使用 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=native-interface:write-attribute(name=security-realm,value=CertificateRealm)
    
    run-batch

    此外,您需要更新连接主域控制器时使用的安全域。此更改必须在主机控制器的配置文件中直接完成,如 host.xmlhost-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:9999}"/>
                </discovery-options>
            </remote>
        </domain-controller>

    警告

    红帽建议显式禁用 SSLv2、SSLv3 和 TLSv1.0,以便在所有受影响的软件包中明确禁用 TLSv1.1 或 TLSv1.2。

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部