Encrypt Passwords
To encrypt a value, follow these steps:
- Create a Java class.
- 
Add voltmxserver-utils.jarto your class path.Path for voltmxserver-utils.jar: <USER_INSTALL_DIR>/VoltMXFoundry_Plugins/middleware/voltmxserver-utils.jar
- 
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
- 
Add dependency jars to the Library. - commons-io-2.4.jarcan be found at https://mvnrepository.com/artifact/commons-io/commons-io/2.4
- log4j-api-2.17.1.jarcan be found at https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api/2.17.1
 
To encrypt a Tomcat value, follow these steps:
- Create a Java class.
- 
Add serverdeployer.jarto your class path.Path for voltmxserver-utils.jar: <USER_INSTALL_DIR>/VoltMXFoundry_Plugins/middleware/serverdeployer.jar
- 
Call the method CryptoUtils.encrypt(<valueToEncrypt>. This will return encrypted value.
- 
Add/Update the password field of the user in the tomcat-users.xmlfile, 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"/>