Property encryption
Property encryption
This document describes the property encryption process.
Do not use the " and ' symbols in your RDP password, as wfagent uses the org.apache.commons.exec.CommandLine third-party library for parsing command-line expressions and this library use these symbols as a string tokenizer.
Get encrypted property
To encrypt properties use status-agent.jar as a command-line tool.
Use the following command to encrypt:
$INSTALL_DIR/lib/java/bin/java -jar -Dencrypt $INSTALL_DIR/apps/wfagent/status-agent-8.4.4.jar -input admin
Make sure to use the $INSTALL_DIR variable inside your user environment variable. Set this variable, if you don't have it. The variable must contain the path of the WorkFusion platform (by default, /opt/workfusion).
Required VM options: -Dencrypt. Add this option before the path to the JAR file. Otherwise, it will run status-agent as a web server.
Required Program arguments: -input X. Here, X is a string line for encryption.
The version of the status agent JAR depends on the version of the WorkFusion platform.
You can find the version of the used status agent in the path $INSTALL_DIR/apps/wfagent.
Put encrypted property to Platform Monitor configuration file (YML)
The output of the command is a string line (for example,
Hyq6LGEIHt2C6HJiDqAQ0w==), which you have to enclose in the ENC( ) construction. As a result, it will look as ENC(Hyq6LGEIHt2C6HJiDqAQ0w==). After that, add the result to the YAML configuration file of status-agent.
Example of result: Application.yml
security:
user:
name: admin
password: ENC(Hyq6LGEIHt2C6HJiDqAQ0w==)
For details about configuration see Platform Monitor the OOTB configurations.