Versions Compared

Key

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

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.

Encrypting the passwords

Follow the steps given below.

...

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. See the related topics for more information.

Changing encrypted passwords

To change any password which we have encrypted already, follow the below steps:

  1. Be sure to shut down the server.

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

  3. Execute the following command:

    Code Block
    ./ciphertool.sh -Dchange
  4. It will prompt for the primary keystore password. Enter the keystore password (which is "wso2carbon" for the default keystore).

  5. The alias values of all the passwords that you encrypted will now be shown in a numbered list. 

  6. 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.

  7. The system will then prompt you (twice) to enter the new password. Enter your new password.

  8. The password should now be changed and encrypted.

Related Topics

Excerpt
hiddentrue

NOTE to Writers: Copy the following links in bullet points.

  • Secure Vault Implementation: Explains how secure vault is implemented in WSO2 Carbon products.
  • Setting up Keystores: Provides details on how to set up new keystores and to configure WSO2 products using keystores.
  • Resolving Passwords: Explains how passwords that are secured with secure vault can be resolved.