Encrypt Passwords
To encrypt a value, follow these steps:
- Create a Java class.
- Add
konyserver-utils.jar
to your class path.Path for konyserver-utils.jar:
<USER_INSTALL_DIR>/QuantumFabric_Plugins/middleware/konyserver-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:
- KONY_SERVER_TRUSTSTORE_PASSWORD
- KONY_SERVER_STORAGE_DATABASE_PASSWORD - Add dependency jars to the Library.
commons-io-2.4.jar
can be found at https://mvnrepository.com/artifact/commons-io/commons-io/2.4log4j-api-2.8.2.jar
can be found at https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api/2.8.2
To encrypt a Tomcat value, follow these steps:
- Create a Java class.
- Add
serverdeployer.jar
to your class path.Path for konyserver-utils.jar:
<USER_INSTALL_DIR>/QuantumFabric_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.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"/>