Skip to content

Encrypt Passwords

To encrypt a value, follow these steps:

  1. Create a Java class.
  2. Add voltmxserver-utils.jar to your class path.

    Path for voltmxserver-utils.jar: <USER_INSTALL_DIR>/VoltMXFoundry_Plugins/middleware/voltmxserver-utils.jar

  3. Call the method EncryptDecryptText.encryptText(<valueToEncrypt>). This will return encrypted value.

    Important: Ensure that you encrypt the following placeholder values for Admin before executing Flyway migration.

    For Admin:

    -  VOLTMX_SERVER_TRUSTSTORE_PASSWORD
    -  VOLTMX_SERVER_STORAGE_DATABASE_PASSWORD

  4. Add dependency jars to the Library.

To encrypt a Tomcat value, follow these steps:

  1. Create a Java class.
  2. Add serverdeployer.jar to your class path.

    Path for voltmxserver-utils.jar: <USER_INSTALL_DIR>/VoltMXFoundry_Plugins/middleware/serverdeployer.jar

  3. Call the method CryptoUtils.encrypt(<valueToEncrypt>. This will return encrypted value.

  4. Add/Update the password field of the user in the tomcat-users.xml file, located in the tomcat_Install_dir/conf folder. Set the role name to manager.

    For example:

<user name="manager" password="7fd20649-e534-4915-b4c5-d8e1a2cbb579" roles="admin-gui,manager-gui,manager-script,manager-jmx,manager-status"/>  
    <role rolename="admin-gui"/>  
    <role rolename="manager-gui"/>  
    <role rolename="manager-script"/>  
    <role rolename="manager-jmx"/>  
    <role rolename="manager-status"/>  
    <role rolename="manager"/>