This documentation is for WSO2 Carbon 4.4.0. View documentation for the latest release.
Page Comparison - Encrypting Passwords with Cipher Tool (v.4 vs v.5) - Carbon 4.4.0 - WSO2 Documentation
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Open a command prompt and go to the <PRODUCT_HOME>/bin directory, where we stored the script. 

    Run the script using the command prompt as shown below.

    Code Block
    ./ -Dconfigure
    The Cipher Tool reads the alias values and their corresponding plain text passwords from the file. Note that this tool identifies plain text defined within square brackets as the plain text passwords. If a password is not specified in the file for a corresponding alias, the user needs to provide it through the command-line. Check whether the alias is a known password alias in Carbon configurations. If the tool modifies the configuration element and file, you must replace the configuration element with the alias name. Define a Secret Callback in the configuration file and add proper name spaces for defining the Secure Vault.
  2. When the above command is executed, the following message is prompted:  "[Please Enter Primary KeyStore Password of Carbon Server : ]". Enter the keystore password (which is "wso2carbon" for the default keystore). If the script execution completed successfully, you will see the following message: "Secret Configurations are written to the property file successfully".

  3. Now, to verify the password encryption: 
    • Open the file and see that the plain text passwords are replaced by a cipher value.
    • Open the relevant configuration files (e.g., rss-config.xml file) and see that the passwords are encrypted. 

    • Open the file stored in the <PRODUCT_HOME>/repository/conf/security/ folder and see that the default configurations are changed.


Changing encrypted passwords

If you want to change a password that is already secured, run the following command:

Code Block
./ -Dchange

If you have encrypted passwords as explained above, note that these passwords have to be decrypted again for the server to be usable. That is, the passwords have to be resolved by a system administrator during server startup.