encrypt the mule message with anypoint jce and xml encrypter

12
Encrypt The Mule Message With Anypoint JCE and XML Encrypter

Upload: jitendra-bafna

Post on 05-Apr-2017

25 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

Encrypt The Mule

Message With Anypoint

JCE and XML Encrypter

Page 2: 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.

Page 3: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

JCE Encrypter

Place the HTTP listener into the canvas and click to open the Properties console.

Click the green + and configure as follows:

Page 4: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

JCE Encrypter

Now, provide Input expression and in this case we will encrypt whole payload. Select Encrypter to

JCE_ENCRYPTER and Operation as Encrypt.

Page 5: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

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.

Page 6: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

JCE Encrypter

Place the outbound file connector after encryption to save final encrypted output.

Page 7: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

JCE Encrypter

Page 8: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

Testing Application

You can use postman to test the application and listening url will be

http://localhost:8081/encrypt.

Page 9: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

Testing Application

Now, you can verify the output directory where you have store final encrypted file.

Page 10: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

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.

Page 11: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

XML Encrypter

Page 12: Encrypt The Mule Message With Anypoint JCE and XML Encrypter

Thank You.