【问题标题】:How to show database password encrypted in standalone.xml by using Elytron (Wildfly 26.x)如何使用 Elytron (Wildfly 26.x) 在standalone.xml 中显示加密的数据库密码
【发布时间】:2022-01-18 21:19:09
【问题描述】:

在迁移到 wildfly 26 期间,为了加密数据源的 dbpassword,我必须使用 Elytron 而不是 Picketbox。 显示在standalone.xml中加密的数据库密码的最佳方法是什么? 是否可以仅通过使用 elytron.bat 使其工作?

一个有效的例子!

【问题讨论】:

    标签: passwords wildfly datasource elytron


    【解决方案1】:

    问题是因为 Wildfly 26.0.0 (JBEAP-23015) 中 elytron.bat 中的错误

    通过使用 Wildlfy 25.0.1.Final 版本,可以创建凭证库并在批处理文件中添加密码凭证。

    elytron-tool.bat credential-store --create -- 
    location="%appserver_home%/standalone/data/mycredstore.cs" --password StorePass
    
    elytron-tool.bat credential-store -- 
    location="%appserver_home%/standalone/data/mycredstore.cs" --password StorePass 
    --add=database-pw --secret=myDBPassword
    

    在standalone.xml中引用这个凭证存储

    <credential-stores>
      <credential-store name="mycredstore" relative-to="jboss.server.data.dir" 
              path="mycredstore.cs" create="true">
      <credential-reference clear-text="StorePass"/>
     </credential-store>
    </credential-stores>
    

    【讨论】:

      猜你喜欢
      • 2016-02-05
      • 1970-01-01
      • 1970-01-01
      • 2010-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-13
      • 2014-10-06
      相关资源
      最近更新 更多