Advanced configuration for the remote agent
This guide covers advanced configuration options for the remote agent.
Configure secrets
The remote user store agent is built-in with a secure vault implementation that allows parsing plain text passwords as encrypted secrets. The downloaded agent zip file contains a ciphertool that can be used to encrypt the secrets defined in the deployment.toml file. To encrypt secrets in the agent configuration file:
-
Add the following [secrets] configurations to the bottom of the
deployment.tomlfile. Secrets can be listed with any alias and the value should be enclosed within double quotes and square brackets.- Configuration format
- Example
[secrets]secret_alias = "[secret_value]"[secrets]connection_password = "[adminpassword]" -
You can use the encrypted secrets for configurations using the
$secret{alias}format.[user_store]connection_password = "$secret{secret_alias}" -
Configure and run the cipher tool to encrypt the secrets in the deployment.toml file.
The agent's internal keystore is used to encrypt and decrypt the secrets. To encrypt the secrets, open a terminal and run the following command.
- Linux/Unix
- Windows
./ciphertool.sh -Dconfigureciphertool.bat -DconfigurenoteWhen you configure secrets in the configuration file, the agent will prompt you to enter the keystore and private key passwords when starting the agent. The default password is
wso2carbon. -
Open the
deployment.tomlfile again and see that the alias secrets are now encrypted.[secrets]connection_password = "xxxxxxx"
Configure remote agent logs
The remote agent provides flexible options for configuring logs such as altering the log level. This helps with debugging and monitoring the agent's operations effectively.
To configure remote agent logs:
-
The user store agent is shipped with
log4j2logging capabilities. The log level can be set specifically for each appender in thelog4j2.propertiesfile by setting the threshold value.rootLogger.level = DEBUGFollowing levels can be configured.
- DEBUG: Logs detailed information for debugging.
- INFO: Logs general operational information.
- WARN: Logs only the potential issues.
- ERROR: Logs only the error events.
- FATAL: Logs critical errors that may cause the application to terminate.
-
Restart the agent to apply the changes.
Was this page helpful?