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
    configure-secure-properties1

    Once installed, you’ll see the Secure Properties option in Mule Palette:

    configure-secure-properties2

  • Create a properties file and define the properties that need to be secured.

    The example below shows a secure.properties file:

    configure-secure-properties3

  • Open the properties file with the Mule Properties Editor
  • configure-secure-properties4

    configure-secure-properties5

  • Double-click the Property Name and click Encrypt
  • configure-secure-properties6

  • Select the Algorithm and note the key that will be used to decrypt the password in the future
    configure-secure-properties7

    configure-secure-properties8

    You’ll see the password is decrypted.

    configure-secure-properties9

  • Go to Global Elements or Config and create a Secure Properties Config
  • configure-secure-properties10

  • 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.

    configure-secure-properties11

  • In configuration, note the secure property: (secureProperty)
    configure-secure-properties12

    If you want to encrypt the property in Runtime Manager properties, add a secureProperties key to mule-artifact.json.

    configure-secure-properties13

    If you want to access or change the secure property in Runtime properties, use secure\:\:sap.password=************

    configure-secure-properties14

— By Preetam Deshmukh