Contact Us 1-800-596-4880

Encryption Strategies

The Security Manager can be configured with one or more encryption strategies that can then be used by encryption transformers, security filters, or secure transports such as SSL or HTTPS. These encryption strategies can greatly simplify configuration for secure messaging as they can be shared across components.

Following is an example of a password-based encryption strategy (PBE) that provides password-based encryption using JCE. Users must specify a password and optionally a salt and iteration count as well. The default algorithm is PBEWithMD5AndDES, but users can specify any valid algorithm supported by JCE.

<security-manager>
    <password-encryption-strategy name="PBE" password="mule"/>
</security-manager>

This strategy can then be referenced by other components in the system such as filters or transformers.

<decrypt-transformer name="EncryptedToByteArray" strategy-ref="PBE"/>

<flow name="Svc1">
        <inbound-endpoint address="vm://test">
            <encryption-security-filter strategy-ref="PBE"/>
        </inbound-endpoint>
    ...cut...
</flow>

<flow name="Svc2">
    ...cut...
          <outbound-endpoint address="vm://output" transformer-refs="EncryptedToByteArray"/>
</flow>

See Also

  • Read more about encryption in Mule Studio in our MuleSoft Blog.