Quick guide to secure/encrypt your properties in MuleSoft
Alex Martinez
Posted on February 12, 2024
NOTE
This post is to generate your encrypted values by manually using the JAR file. You can also use the (unofficial) UI or refer to this article.
Download the Secure Properties Tool Jar file from the Mule docs
You can see in the docs how to encrypt your properties with different scenarios, but the following scripts are the ones I use the most.
Encrypt one value at a time
I normally use the Blowfish algorithm and the CBC mode:
java -cp secure-properties-tool.jar com.mulesoft.tools.SecurePropertiesTool \
string \
encrypt \
Blowfish \
CBC \
your_secure_key \
"value_to_encrypt"
Then, just make sure to add ![]
in your properties file.
Encrypt the whole file (per value)
If you don't want to do the previous script for all of the values, you can also run this instead:
java -cp secure-properties-tool.jar com.mulesoft.tools.SecurePropertiesTool \
file \
encrypt \
Blowfish \
CBC \
your_secure_key \
input_file.yaml \
output_file.yaml
This will automatically add the ![]
syntax to each value.
💖 💪 🙅 🚩
Alex Martinez
Posted on February 12, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.