Studio Visual Editor
-
Create an global Encryption element, specifying a name for the element if you wish; keep the default value for the Default Encrypter:` JCE_ENCRYPTER`.
-
Set an Encryption message processor in the flow in which you wish to encrypt data in the message payload.
-
Configure the message processor according the table below.
Field Req’d Value Display Name
A unique name for your message processor.
Config Reference
x
Use the drop down to select the global Encryption element you created.
Operation
x
Encrypt
Input reference
Enter a Mule expression to define the part(s) of the message Mule should encrypt. If no value is entered, Mule encrypts the entire message payload.
Select encrypter
x
JCE_ECRYPTER
Reference or expression
If selected, in the Jce Encrypter Reference, use an expression to reference attributes you have defined elsewhere in the XML configuration of your applications, or to reference the configurations defined in a bean.
Define attributes
If selected, enter values in the following four fields.
Key †
x
The key (i.e. password) to decrypt the encrypted data.
Key Password †
If the key is stored in a keystore, enter the passwoard to the keystore.
Algorithm
Select an algorithm to use to encrypt the data. Refer to Appendix below for list of available algorithms.
Encryption Mode
Select an encryption code for Mule to use to encrypt the data.
† Mutually exclusive
XML Editor or Standalone
-
Create an global
encryption:config
element, set above all the flows in your config file. -
Configure the attributes of the element according to the table below.
<encryption:config name="Encryption" defaultEncrypter="JCE_ENCRYPTER" doc:name="Encryption"/>
Attribute Req’d Value name
x
A unique name for your global element.
defaultEncrypter
JCE_ENCRYPTER
doc:name
A display name for the element in Studio’s Visual Editor. Not applicable for Standalone.
-
Add an
encryption:encrypt
element to the flow in which you wish to encrypt data in the message payload. -
Configure the element’s attributes and child elements according to the tables below.
<encryption:encrypt config-ref="Encryption" doc:name="Encryption" using="JCE_ENCRYPTER" input-ref="#[message.payload]"> <encryption:jce-encrypter key="test" algorithm="Blowfish" encryptionMode="CFB"/> </encryption:encrypt>
Attribute Req’d Value config-ref
x
Use the name of the global Encryption element you created.
doc:name
A display name for the element in Studio’s Visual Editor. Not applicable for Standalone.
using
x
JCE_ENCRYPTER
input-ref
Enter a Mule expression to define the part(s) of the message Mule should encrypt. If no value is entered, Mule encrypts the entire message payload.
Child Attribute Req’d encryption:jce-encrypter
x
Child Element Attributes Req’d Value key†
x
Specify the key (i.e. password) to decrypt the encrypted data.
algorithm
Specify the algorithm to use to encrypt the data. Refer to Appendix below for list of available algorithms.
encryption Mode
Specify an encryption code for Mule to use to encrypt the data.
keyPassword†
If the key is stored in a keystore, specify the passwoard to the keystore.
† Mutually exclusive