+

Migrating the Secure Properties Placeholder

Standard Support for Mule 4.2 ended on May 2, 2021, and this version of Mule will reach its End of Life on May 2, 2023, when Extended Support ends.

Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted.

MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements.

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
<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 comma (,). 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 Mule 4 Secure Configuration Properties).

A full migration of the Mule 3 example looks like this:

Example: Complete Migration Example
<secure-properties:config
  key="${prod.key}"
  file="test.${env}.properties"
  name="Secure_Property_Placeholder">
    <secure-properties:encrypt algorithm="Blowfish" mode="CBC"/>
</secure-properties:config>
Was this article helpful? Thanks for your feedback!
View on GitHub