-1

During migration to wildfly 26 in order to encrypt dbpassword of datasource I must use Elytron instead of Picketbox. what is the best way to show database password encrypted in standalone.xml? is it possible to get it working only by using elytron.bat?

a working example appreciated!

cemkucuk
  • 1
  • 2

1 Answers1

0

The Problem was because of a bug in elytron.bat in Wildfly 26.0.0 (JBEAP-23015)

By using Wildlfy 25.0.1.Final Version it was possible to create a credentialstore and add a password credential in a batch file.

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

To refer this credential store in 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>
cemkucuk
  • 1
  • 2