1.7. 使用 Elytron 客户端的凭证存储示例


连接到 JBoss EAP(如 Jakarta Enterprise Bean)的客户端可以使用 Elytron 客户端进行身份验证。无法访问正在运行的 JBoss EAP 服务器的用户可以使用 WildFly Elytron 工具创建和修改凭证存储,然后客户端可以使用 Elytron 客户端访问凭证存储中的敏感字符串。

以下示例演示了如何在 Elytron 客户端配置文件中使用凭证存储。

带有 Credential Store 的 custom-config.xml 示例

<configuration>
  <authentication-client xmlns="urn:elytron:client:1.7">
    ...
    <credential-stores>
      <credential-store name="my_store"> 
1

        <protection-parameter-credentials>
          <credential-store-reference clear-text="pass123"/> 
2

        </protection-parameter-credentials>
        <attributes>
          <attribute name="location" value="/path/to/my_store.jceks"/> 
3

        </attributes>
      </credential-store>
    </credential-stores>
    ...
    <authentication-configurations>
      <configuration name="my_user">
        <set-host name="localhost"/>
        <set-user-name name="my_user"/>
        <set-mechanism-realm name="ManagementRealm"/>
        <use-provider-sasl-factory/>
        <credentials>
          <credential-store-reference store="my_store" alias="my_user"/> 
4

        </credentials>
      </configuration>
    </authentication-configurations>
    ...
  </authentication-client>
</configuration>
Copy to Clipboard Toggle word wrap

1
在 Elytron 客户端配置文件中使用的凭证存储的名称。
2
凭据存储的密码。
3
凭证存储文件的路径。
4
存储在凭证存储中的敏感字符串的凭证引用。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat