The instructions on this page explains how plain text passwords in configuration files can be encrypted using the secure vault implementation that is built into WSO2 products. Note that you can customize the default secure vault configurations in the product by implementing a new secret repository, call back handler etc.
Note |
---|
The default keystore that is shipped with your WSO2 product (i.e. wso2carbon.jks) is assumed to be the keystore used for encrypting plain text passwords. |
See the following topics:
Encrypting the passwords
Follow the steps given below.
...
Changing encrypted passwords
To change any password which we have encrypted already, follow the below steps:
Be sure to shut down the server.
Open a command prompt and go to the
<PRODUCT_HOME>/bin
directory, where we have stored theciphertool.sh
script.Execute the following command:
Code Block ./ciphertool.sh -Dchange
It will prompt for the primary keystore password. Enter the keystore password (which is "wso2carbon" for the default keystore).
The alias values of all the passwords that you encrypted will now be shown in a numbered list.
The system will then prompt you to select the alias of the password which you want to change. Enter the list number of the password alias.
The system will then prompt you (twice) to enter the new password. Enter your new password.
The password should now be changed and encrypted.
...