Skip to main content

Integration & IT Modernization

Mule Enterprise Security- Password Encryption Steps

Every project needs to store passwords to access some resources, such as DB, network accounts etc.  Mule uses java properties to store the passwords. Since property files are in text format, we need to encrypt these passwords.

There are two ways to do this with Mule. One method is to use pure java solution, the other is to use Mule enterprise security package. This post describes the latter with step by step instructions.


Please reference for Enterprise Security install. Here are screen shots.



Edit Properties

After install and restart studio, right click on property file and select “Mule Property Editor” to open the property file (reference



Add properties


Encrypt password

Select the master password (for testing, you can select “mule”), this master password will be entered by the admin at runtime for production environment, select BlowFish for Algorithm


Add “Property PlaceHolder”

Enter the property file name (custom property files are stored under main/resources):

encrypt-image8 encrypt-image9

Add Security Property PlaceHolder



Testing In Studio:





Testing on ESB server:

Using command line –M-Denv=test –M-Dmasterkey=mule

Run “mule –M-Denv=tst  -M-Dmasterkey=mule

Side Notes:

Warning: I have encountered the situation when “property-placeholder” appeared before “secure-property-placeholder” can cause decryption to fail. Not sure that’s the exact cause…

<secure-property-placeholder:config name=”Secure_Property_Placeholder” encryptionAlgorithm=”Blowfish” key=”${masterkey}” location=”enc-${env}.properties” doc:name=”Secure Property Placeholder”/>

<context:property-placeholder location=”enc-${env}.properties”/>

Thoughts on “Mule Enterprise Security- Password Encryption Steps”

  1. Hi. I followed your guide but I get the following error.
    cvc-complex-type.2.4.a: Invalid content was found starting with element ‘secure-property-placeholder:config’. One of ‘{“
    re”:annotations, “”:description, “”:beans, “”:bean, “http://www.springfram”:property-placeholder, “”:ref, “”:global-property, “
    “:configuration, “”:notifications, “”:abstract-extension, “”:abstract-shared-ext
    ension, “”:abstract-mixed-content-extension, “”:abstract-agent, “”:abstract-secu
    rity-manager, “”:abstract-transaction-manager, “”:abstract-shared-transaction-manager, “
    ule/core”:abstract-connector, “”:abstract-shared-connector, “”:abstract-global-endpoint, “
    /mule/core”:abstract-exception-strategy, “”:abstract-flow-construct, “”:flow, “”
    :sub-flow, “”:abstract-model, “”:abstract-interceptor-stack, “”:abstract-filter,
    “”:abstract-transformer, “”:processor-chain, “”:custom-processor, “http://www.m”:abstract-empty-processor, “”:invoke, “”:set-payload, “
    core”:abstract-global-intercepting-message-processor, “”:custom-queue-store, “”:abstract-processing-strategy}’ is expect

  2. Yuan Meng Post author

    A few questions for you… what’s the full version of your studio? on which step did you get the error? do you have another computer that you can install a new studio and test it?

    I have followed the same steps before, it was working. I just installed on a brand new VM today. I’ll give a try later and let you know.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow Us