How to configure secure properties in Mule 4 and access them through Runtime Manager
- March 17, 2020
This tech article describes how to configure secure properties in Mule 4 and access them through Runtime Manager.
- Install the Mule Secure Configuration Property Extension from Exchange in the Mule Palette
Once installed, you’ll see the Secure Properties option in Mule Palette:
- Create a properties file and define the properties that need to be secured.
The example below shows a secure.properties file:
- Open the properties file with the Mule Properties Editor
- Double-click the Property Name and click Encrypt
- Select the Algorithm and note the key that will be used to decrypt the password in the future
You’ll see the password is decrypted.
- Go to Global Elements or Config and create a Secure Properties Config
- Select the Algorithm, Key and File to be secured
NOTE: Use an algorithm and key similar to what was used while encrypting the password in the prior step.
- In configuration, note the secure property: (secureProperty)
If you want to encrypt the property in Runtime Manager properties, add a secureProperties key to mule-artifact.json.
If you want to access or change the secure property in Runtime properties, use secure\:\:sap.password=************
— By Preetam Deshmukh