SlideShare a Scribd company logo
1 of 17
By Anirban Sen Chowdhary
.
Fortunately we have base64-encoder-transformer and base64-
decoder-transformer available in our Mule
So, to encrypt a payload in our Mule flow, we can use
base64-encoder-transformer as follows :-
As you can see we have used a file inbound to pick a file in our flow,
and then we encrypt it with base64-encoder-transformer and the
output of the flow will produce a encrypted file
Our corresponding Mule flow will be as follows :-
<flow name="encryptFlow1" doc:name="encryptFlow1">
<file:inbound-endpoint path="E:backuptest"
responseTimeout="10000" doc:name="File">
<file:filename-regex-filter pattern="abc.doc"
caseSensitive="false" />
</file:inbound-endpoint>
<base64-encoder-transformer encoding="utf8" />
<logger level="INFO" message="#[message.payloadAs(java.lang.String)]" />
<file:outbound-endpoint path="E:backuptestnewfolder"
responseTimeout="10000" doc:name="File" />
</flow>
As you can see in the code it will pick a file called abc.doc from
E:backuptest location , encrypt it and put the encrypted file to
E:backuptestnewfolder
So, let us place a file abc.doc in the source folder as follows :-
Let run our application and we can see, the file has been
transferred to location E:backuptestnewfolder
Now, this transferred file is an encrypted file
We can see our compressed file here in location
E:backuptestnewfolder :-
Now if we open the file abc.doc in E:backuptestnewfolder
we will find the content of the file is in encrypted form as
follows:-
Now what about decrypting the file back to the original content
???
In case of decrypting a file back to original content ( content
before the encryption) we will be using base64-decoder-
transformer as follows:-
As you can see, it will pick up the encrypted file abc.doc from the
location E:backuptestnewfolder and put it into a new location
E:backuptestoriginalFile
The corresponding our Mule flow will be :-
<flow name="decrypt">
<file:inbound-endpoint path="E:backuptestnewfolder"
responseTimeout="10000" doc:name="File">
<file:filename-regex-filter pattern="abc.doc"
caseSensitive="false" />
</file:inbound-endpoint>
<base64-decoder-transformer encoding="utf8" />
<file:outbound-endpoint path="E:backuptestoriginalFile"
responseTimeout="10000" doc:name="File" />
</flow>
Now if we run the flow, we will get the following in our console :-
The file has been decrypted back to it’s original content into the
location E:backuptestoriginalFile
Now if we open the decrypted file we will get a normal content:-
Hope you enjoyed the tips of compressing and decompressing using
base64-encoder-transformer/base64-decoder-transformer in Mule
Next slide I will bring some more simple yet interesting topic
Encrypting/Decrypting  mule

More Related Content

What's hot

What's hot (15)

Caching & validating
Caching & validatingCaching & validating
Caching & validating
 
Accessing Mule variables in groovy
Accessing Mule variables in groovyAccessing Mule variables in groovy
Accessing Mule variables in groovy
 
Parameters as a part of body
Parameters as a part of bodyParameters as a part of body
Parameters as a part of body
 
Input and output flow using http and java component
Input and output flow using http and java componentInput and output flow using http and java component
Input and output flow using http and java component
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in Mule
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Groovy with Mule
Groovy with MuleGroovy with Mule
Groovy with Mule
 
Integration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESBIntegration with Dropbox using Mule ESB
Integration with Dropbox using Mule ESB
 

Viewers also liked (9)

Mule new jdbc component
Mule new jdbc componentMule new jdbc component
Mule new jdbc component
 
Calling database with groovy in mule
Calling database with groovy in muleCalling database with groovy in mule
Calling database with groovy in mule
 
Basic example using file connector in anypoint studio
Basic example using file connector in anypoint studioBasic example using file connector in anypoint studio
Basic example using file connector in anypoint studio
 
Cloudhub in action
Cloudhub in actionCloudhub in action
Cloudhub in action
 
RAMLing around with mule part2
RAMLing around with mule part2RAMLing around with mule part2
RAMLing around with mule part2
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
 
Mule MMC as a service
Mule MMC as a serviceMule MMC as a service
Mule MMC as a service
 
Basic example using vm component
Basic example using vm componentBasic example using vm component
Basic example using vm component
 
VM example in mule
VM example in muleVM example in mule
VM example in mule
 

Similar to Encrypting/Decrypting mule

Solr Application Development Tutorial
Solr Application Development TutorialSolr Application Development Tutorial
Solr Application Development Tutorial
Erik Hatcher
 
On secure application of PHP wrappers
On secure application  of PHP wrappersOn secure application  of PHP wrappers
On secure application of PHP wrappers
Positive Hack Days
 

Similar to Encrypting/Decrypting mule (20)

MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise securityMuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
MuleSoft ESB Payload Encrypt Decrypt using anypoint enterprise security
 
Vancouver presentation
Vancouver presentationVancouver presentation
Vancouver presentation
 
Validating a json in mule
Validating a json in muleValidating a json in mule
Validating a json in mule
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 
SphinxSE with MySQL
SphinxSE with MySQLSphinxSE with MySQL
SphinxSE with MySQL
 
Adding dynamic file
Adding dynamic fileAdding dynamic file
Adding dynamic file
 
Downloading a Billion Files in Python
Downloading a Billion Files in PythonDownloading a Billion Files in Python
Downloading a Billion Files in Python
 
Laravel intake 37 all days
Laravel intake 37 all daysLaravel intake 37 all days
Laravel intake 37 all days
 
Advanced Sqoop
Advanced Sqoop Advanced Sqoop
Advanced Sqoop
 
HTTP Caching and PHP
HTTP Caching and PHPHTTP Caching and PHP
HTTP Caching and PHP
 
Solr Application Development Tutorial
Solr Application Development TutorialSolr Application Development Tutorial
Solr Application Development Tutorial
 
On secure application of PHP wrappers
On secure application  of PHP wrappersOn secure application  of PHP wrappers
On secure application of PHP wrappers
 
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
 
Splunk
Splunk Splunk
Splunk
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
 
Drupal 8 configuration management
Drupal 8 configuration managementDrupal 8 configuration management
Drupal 8 configuration management
 
Standby db creation commands
Standby db creation commandsStandby db creation commands
Standby db creation commands
 
AmazonS3 & Rails
AmazonS3 & RailsAmazonS3 & Rails
AmazonS3 & Rails
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
 
Approach to find critical vulnerabilities
Approach to find critical vulnerabilitiesApproach to find critical vulnerabilities
Approach to find critical vulnerabilities
 

More from Anirban Sen Chowdhary

More from Anirban Sen Chowdhary (20)

Change the game with Game changer
Change the game with Game changerChange the game with Game changer
Change the game with Game changer
 
Ring central desktop app overview
Ring central desktop app overviewRing central desktop app overview
Ring central desktop app overview
 
Overview in ringcentral digital line
Overview in ringcentral digital lineOverview in ringcentral digital line
Overview in ringcentral digital line
 
Some basics with ring central
Some basics with ring centralSome basics with ring central
Some basics with ring central
 
Ring central and python
Ring central and pythonRing central and python
Ring central and python
 
RingCentral application development overview
RingCentral application development overviewRingCentral application development overview
RingCentral application development overview
 
Cloze connect ringcentral
Cloze connect ringcentralCloze connect ringcentral
Cloze connect ringcentral
 
Overview on ring central errors part 4
Overview on ring central errors part 4Overview on ring central errors part 4
Overview on ring central errors part 4
 
Setting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsSetting up your ring central sandbox in steps
Setting up your ring central sandbox in steps
 
Overview on ring central errors: part 2
Overview on ring central errors: part 2Overview on ring central errors: part 2
Overview on ring central errors: part 2
 
Overview on ring central errors
Overview on ring central errorsOverview on ring central errors
Overview on ring central errors
 
Call recording overview ring central
Call recording overview  ring centralCall recording overview  ring central
Call recording overview ring central
 
Ring central engaging with amazon alexa
Ring central engaging with amazon alexaRing central engaging with amazon alexa
Ring central engaging with amazon alexa
 
How ring central sdk changing the game
How ring central sdk changing the gameHow ring central sdk changing the game
How ring central sdk changing the game
 
When ring central connect salesforce
When ring central connect salesforceWhen ring central connect salesforce
When ring central connect salesforce
 
Mule 4 connecting ring central
Mule 4 connecting ring centralMule 4 connecting ring central
Mule 4 connecting ring central
 
Ring central sdk
Ring central sdkRing central sdk
Ring central sdk
 
Ring central with okta
Ring central with oktaRing central with okta
Ring central with okta
 
Ring central connecting salesforce overview
Ring central connecting salesforce overviewRing central connecting salesforce overview
Ring central connecting salesforce overview
 
Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Ring central call logs overview (part 2)
Ring central call logs overview (part 2)
 

Recently uploaded

Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
Overkill Security
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
Wonjun Hwang
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 

Encrypting/Decrypting mule

  • 1. By Anirban Sen Chowdhary
  • 2.
  • 3. .
  • 4. Fortunately we have base64-encoder-transformer and base64- decoder-transformer available in our Mule
  • 5. So, to encrypt a payload in our Mule flow, we can use base64-encoder-transformer as follows :- As you can see we have used a file inbound to pick a file in our flow, and then we encrypt it with base64-encoder-transformer and the output of the flow will produce a encrypted file
  • 6. Our corresponding Mule flow will be as follows :- <flow name="encryptFlow1" doc:name="encryptFlow1"> <file:inbound-endpoint path="E:backuptest" responseTimeout="10000" doc:name="File"> <file:filename-regex-filter pattern="abc.doc" caseSensitive="false" /> </file:inbound-endpoint> <base64-encoder-transformer encoding="utf8" /> <logger level="INFO" message="#[message.payloadAs(java.lang.String)]" /> <file:outbound-endpoint path="E:backuptestnewfolder" responseTimeout="10000" doc:name="File" /> </flow>
  • 7. As you can see in the code it will pick a file called abc.doc from E:backuptest location , encrypt it and put the encrypted file to E:backuptestnewfolder So, let us place a file abc.doc in the source folder as follows :-
  • 8. Let run our application and we can see, the file has been transferred to location E:backuptestnewfolder Now, this transferred file is an encrypted file
  • 9. We can see our compressed file here in location E:backuptestnewfolder :-
  • 10. Now if we open the file abc.doc in E:backuptestnewfolder we will find the content of the file is in encrypted form as follows:-
  • 11. Now what about decrypting the file back to the original content ???
  • 12. In case of decrypting a file back to original content ( content before the encryption) we will be using base64-decoder- transformer as follows:- As you can see, it will pick up the encrypted file abc.doc from the location E:backuptestnewfolder and put it into a new location E:backuptestoriginalFile
  • 13. The corresponding our Mule flow will be :- <flow name="decrypt"> <file:inbound-endpoint path="E:backuptestnewfolder" responseTimeout="10000" doc:name="File"> <file:filename-regex-filter pattern="abc.doc" caseSensitive="false" /> </file:inbound-endpoint> <base64-decoder-transformer encoding="utf8" /> <file:outbound-endpoint path="E:backuptestoriginalFile" responseTimeout="10000" doc:name="File" /> </flow>
  • 14. Now if we run the flow, we will get the following in our console :- The file has been decrypted back to it’s original content into the location E:backuptestoriginalFile
  • 15. Now if we open the decrypted file we will get a normal content:-
  • 16. Hope you enjoyed the tips of compressing and decompressing using base64-encoder-transformer/base64-decoder-transformer in Mule Next slide I will bring some more simple yet interesting topic