Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

Migrating the Secure Properties Placeholder

In Mule 3, the Secure Properties Placeholder was part of the Security Module. In Mule 4, it is separated in its own Secure Configuration Properties module.

Example: Complete Secure Properties Placeholder in Mule 3

         
      
1
2
3
4
<secure-property-placeholder:config
  name="Secure_Property_Placeholder" key="${prod.key}"
  location="test.${env}.properties" encryptionAlgorithm="Blowfish"
  encryptionMode="CBC"/>

Differences between Mule 3 and Mule 4:

  • The Mule 3 location attribute is replaced by file in Mule 4 for consistency with other components.

  • In Mule 3, location can define more than one file, separated by a semi-colon (;). In Mule 4, this is not possible for troubleshooting purposes. Instead, you need to to define a <secure-properties:config> tag for each file.

  • For overlapping properties between files, Mule 3 preserves the last definition. The Mule 4 module preserves the first definition.

  • The encryption attributes (mode and algorithm) are defined in the child tag <secure-properties:encrypt/>, and the supported algorithms and modes are the same for both Mule 3 and 4 (see [secure_configuration_properties]).

A full migration of the Mule 3 example looks like this: .Example: Complete Migration Example


         
      
1
2
3
4
5
6
<secure-properties:config
  key="${prod.key}"
  file="test.${env}.properties"
  name="Secure_Property_Placeholder">
    <secure-properties:encrypt algorithm="Blowfish" mode="CBC"/>
</secure-properties:config>

In this topic: