DEV Community

Alex Martinez
Alex Martinez

Posted on

Quick guide to secure/encrypt your properties in MuleSoft

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"
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

This will automatically add the ![] syntax to each value.

Top comments (0)