Encrypt the database access password
By default, the database access password is not hidden on Payara services.
Below are the steps to follow to hide it.
Windows:
Open a PowerShell prompt and navigate to the Payara bin folder:
We must then create an alias for the password (make a note of this alias, as it will be useful later in the procedure!).
You will then be asked to enter the actual database access password twice.
A domain.password file is then automatically created in C:\Program Files\Gespage\GespageCore\server\payara5\glassfish\domains\domain1\conf\. This file is encrypted.
We must then edit the Gespage domain.xml file, located in C:\Program Files\Gespage\GespageCore\server\payara5\glassfish\domains\domain1\conf\, to enter our alias. I recommend using NotePad++ for ease of use.
At the beginning of the file is the database connection information.
Replace the ‘Password’ property with the name of our alias:
example:

Finally, simply restart the Gespage Application Server service.
Linux:
Open a terminal and navigate to the Payara bin folder:
We must then create an alias for the password (make a note of this alias, as it will be useful later in the procedure!).
You will then be asked to enter the actual password for accessing the database twice.
A domain.password file is then automatically created in /opt/Gespage/GespageCore/server/payara5/glassfish/domains/domain1/conf/. This file is encrypted.
We must then edit the Gespage domain.xml file using the following command:
At the beginning of the file is the database connection information.
You must replace the ‘Password’ property with the name of our alias:
example:

Finally, simply restart Gespage using the following command:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article