• In the src/main/resources folder of the project, right-click and select New -> File.

  • In the New file wizard, provide a file name, which should include .properties extension. Ex: prod.properties. Click finish.

  • In the project explorer, right-click the .properties file and select Open with -> Mule Properties Editor.

  • Click on the green + icon in the studio. In the Add New Property window, add a key and a value. Click on Encrypt button if you want to encrypt the value, and do not if you don't want to.

  • If you click on Encrypt, in the Setup encryption information dialog box that appears, select an algorithm and provide a key that will be used to encrypt the value. Click OK.

  • After you click OK, the encrypted value looks as shown below. Click OK.

  • Repeat the above steps to add more values to the Credentials Vault.

  • Create a Global Secure Property Placeholder

    1. Click on the Global Elements tab. Select Secure Property Placeholder. Click OK.

    2. In the Secure Property Placeholder wizard, set the Encryption Algorithm, Encryption Mode, and key. The Encryption Algorithm will be the same as you used at the time of the encryption process above. The key will be the value that you used to encrypt your value above (STEP 6).

    Here, ${property} instructs Mule to demand the key at runtime.

    Local Setup

    1. Click on the Message flow tab and create the following flow.

    2. Open the mule-app.properties file in the project explorer.

    3. Add the following property to it:

    4. Outlook above is my key. You need to add your encrypted key here.

    5. After you run this application, call the following flow and look at the console. You will see that the encrypted value is getting printed after decryption.

    Thank you!

    Anypoint Studio 6

    integration,mule 3,mule 4,mule,Anypoint Enterprise Security,integration tutorial,tutorial

    Anypoint Studio Download Mac

    Opinions expressed by DZone contributors are their own.