Necessary Actions When Updating/Upgrading
...
8.10 --> 8.12
- The password for the database connection of the core-service that is defined in the
jas-app.xml
file can now be stored in a credential store instead of saving it in plain text in the file.
This is an optional feature. If you want to implement it, follow these steps:- Stop the core-service.
- Create a credential store.
- Open the file
<core-service>\tools\change-db-pwd.bat
- Replace all occurrences of @@CS_PASSWORD@@ with the same arbitrary password of your choice (for the credential store).
- Save the file
- Open a command prompt and change the directory to <core-service>\tools
- Execute the following command:
change-db-pwd.bat "databaseUserPassword"
Replace databaseUserPassword with the password of the user that connects to the database
- Open the file
- Add the credential store to the
jas-app.xml
file and point the database connection password to it.- Open the
<core-service>\standalone\configuration\jas-app.xml
file. Locate the
<subsystem xmlns="urn:wildfly:elytron...>
section and add the credential stores section to it as shown below. Replace"CS_PASSWORD"
with your the credential store password chosen above.<
subsystem
xmlns="urn:wildfly:elytron...>
<
credential-stores
>
<
credential-store
name
=
"dbcredstore"
relative-to
=
"jboss.server.config.dir"
path
=
"dbcredstore.cs"
create
=
"true"
>
<
credential-reference
clear-text
=
"CS_PASSWORD"
/>
</
credential-store
>
</
credential-stores
>
Locate the
<datasource jndi-name="java:/JASDB"
...>
section and replace the line<password>databaseUserPassword</password>
with<credential-reference store="dbcredstore" alias="databasePW" />
as shown below.<
datasource
jndi-name
=
"java:/JASDB"
...>
...
<
security
>
<
user-name
>sa</
user-name
>
<
credential-reference
store
=
"dbcredstore"
alias
=
"databasePW"
/>
</
security
>
- Open the
- Save and restart the core-service.
To change the password at a later time, execute the batch-file<core-service>\tools\change-db-pwd.bat
.
(Make sure the change-db-pwd.bat file does not contain any @@CS_PASSWORD@@ occurrences - if so replace them as described above.)
- The password for the database connection of the core-service that is defined in the
...