encrypt the mule message with anypoint jce and xml encrypter
TRANSCRIPT
Encrypt The Mule
Message With Anypoint
JCE and XML Encrypter
Encrypt The Mule Message With
Anypoint JCE and XML Encrypter
Security is one the very important aspects when we are developing the integration solution
especially in the banking, finance sectors etc. Whenever you want to send your data securely
over the channel to third parties, it is very important that you send your data encrypted so it
become unreadable for unauthorized entities.
Mulesoft provided various Encryption Strategy to encrypt your message.
JCE Encrypter
Place the HTTP listener into the canvas and click to open the Properties console.
Click the green + and configure as follows:
JCE Encrypter
Now, provide Input expression and in this case we will encrypt whole payload. Select Encrypter to
JCE_ENCRYPTER and Operation as Encrypt.
JCE Encrypter
Now, under JCE Encrypter Strategy Configuration for operation select Define attributes radio
button. Provide Key, Key Password (Optional). Select Algorithm and Encryption Mode.
JCE Encrypter
Place the outbound file connector after encryption to save final encrypted output.
JCE Encrypter
Testing Application
You can use postman to test the application and listening url will be
http://localhost:8081/encrypt.
Testing Application
Now, you can verify the output directory where you have store final encrypted file.
XML Encrypter
In this case, you need to select XML Encrypter instead of JCE Encrypter. Under Connector
Configuration select Default Encrypter as XML. Select Encrypter to XML_ENCRYPTER. Under XML
Encrypter Strategy Configuration for operation, select Define attributes radio button. Provide Key,
Key Password (Optional). Select Algorithm and Encryption Mode.
In XML Encrypter, you can encrypt particular field data instead of encrypting while data. You can
provide the xpath of field that you need to encrypt.
XML Encrypter
Thank You.