Properties Files¶
Values in properties files can be encrypted. Let's say you have a property myurl
in your local.properties which depends on a password and you would like to encode the password Password123456
.
-
Under the scripts directory, use the
tools.sh
(tools.bat
for Windows) to create a 256-bit strength key (feel free to adjust the strength). -
Add this option to your start.sh so that AMI knows where the secret key for decoding encrypted properties is located
-
Using the same tools.sh, Encode the password and copy the output text into your clipboard
Example encoded password:
-
Change your local.properties file to use the encrypted value instead, by enclosing with ${CIPHER: ... }
-
Restart AMI
In the AmiOne.log you'll see that the value for the myurl
property is substituted with ***** for security purposes.
You can see the password listed in the user interface by going to Dashboard -> Session Variables. You can also decrypt using tool.sh
by running:
Note
If you see the following error: Error: Could not find or load main class
please modify the tools script to point to com.f1.utils.encrypt.EncrypterTool
or com.f1.encrypt.EncrypterTool