SlideShare a Scribd company logo
PGP (Pretty Good Privacy) with Mule
- Anil Kumar. V
1
PGP in a Nutshell
What is PGP
PGP - Pretty Good Privacy, was created by Phil Zimmermann, is a data encryption and
decryption program for data privacy communicated between the two parties.
PGP works by encrypting a message using a public key that’s tied to a specific user; when
that user receives the message, they use a private key that is known only to them to
decrypt it.
How secure is PGP
While it is impossible to say any encryption methodology is safe and secure, PGP is
generally considered as being extremely safe and secure. Bruce Schneier, an internationally
renowned security technologist, stated PGP is the encryption methodology that is closest to
get military-grade encryption and there are no practical weaknesses.
2
3
How PGP can be used with Mule and where?
Mule supports security with Anypoint Enterprise Security module. First thing, we need to
make sure to install the Anypoint Enterprise Security module in Anypoint Studio i.e., Mule
IDE. In order to add Security module to Anypoint Studio, please follow the instructions here.
Once the Anypoint Enterprise Security module is
installed, you should see a new palette group called
Security in the studio like this
4
Encryption Module
Mule can encrypt the entire payload or specific part s of the payload depending upon the
encryption strategy. Mule supports 3 encryption strategies;
Note: PGP is generally considered as being extremely safe and secure over JCE and XML Encrypter’s.
Encryption Strategy Name Characteristics
JCE Encrypter (Default) • Encrypts Stream, byte[] or String
type of payload
XML Encrypter • Encrypts String type of payload
• Encrypts full payload or partial
using xpath
PGP Encrypter • Encrypts Stream, byte[] or
String type of payload
• Adds the processing overload
5
Lets consider a small use case to demonstrate on how to implement PGP
encryption in mule with ‘Encryption Processor’
Use case:
In this article, we will be implementing a flow which will fetch data from a database table
and then send the data to a queue in Active MQ, encrypt the data before sending it to
queue.
Components used in this use case:
• HTTP To trigger the flow
• Database Fetch the data from database
• JMS Enqueue/Dequeue messages
• Encryption PGP Encryption to encrypt the data
• Object to Byte
Array
Convert payload object into byte array for PGP to
process
• Byte Array to
Object
Convert payload from byte array to object after PGP
process
• For Each Iterate over the database results
6
Create new project viz., pgp_test
create project in Anypoint Studio, by selecting the top menu bar
select File > New > Mule Project
7
After project is created, create a flow with the following components and transformers in
the same order:
Flow should look like
1. HTTP URL : http://localhost:8081/pgptest
2. Database Configure to select data from a simple table, something like Employee
table in your local/remote db
3. For Each
4. Object to Byte Array
5. Encryption Refer next slide/page
6. JMS Point to a queue viz., ‘employee’ in your local Active MQ
8
Lets see what is required to configure the ‘Encryption’ module in detail:
1). Configure the Encryption module to use the PGP_ENCRYPTER as per below
2). Add a Global Encryption Configuration by clicking on the Connector Configuration + icon
under Basic Settings and set the value to PGP_ENCRYPTER for Default Encrypter as shown
below
9
3). Select the ‘Pgp Encrypter’ tab and select the ‘Define attributes’
What is a key ring?
In secure data-transmission, a key ring consists of a public key and its corresponding private key both of which are required to
read the data.
You can use my Public Key Ring & Secret Key Ring files and use them in the flow. If you
intend to do so, set the rest of the values as follows:
Secret Alias Id : 8923421754335606047
Secret Passphrase : mulepgp
Principal : mulepgp
10
4). If you prefer to generate your own key ring files, you can make use the gpg command-
line utility.
GPG Keychain Access for Mac OS
Gpg4win for Windows
This screenshot shows how my keys were generated using the gpg command from
Windows. Note that the pubring.gpg and secring.gpg key files will be created in a hidden
directory called `gnupg` under the user home directory. On Windows, this will be
in C:Users<username>AppDataRoaminggnupg.
The Principal will be the USER-ID which is a combination of the Real Name, Email Address
and Comment. To keep it simple, you can just use choose a simple Real Name and leave
email and comment blank. In my example, I simply set the Real Name to `mulepgp` and the
Secret Passphrase to `mulepgp`.
Determining the numeric value for the `Secret Alias Id` is not obvious. The GPG utility does
not show this numeric value. The best way to derive this is by letting Mule give you some
clues. Put any random number initially for the `Secret Alias Id` and run it to let Mule throw
an error on purpose. In the exception thrown from the console output, it will show you a
message with the keys you can use.
Thanks Mariano Gonzales for the above tips
11
5). Okay….. We did talk too much isn’t it?
Now its time to test the talk
Run the flow as Mule Application….. Check the console for successful application
deployment
6). Open Postman or something similar then type the URL,
http://localhost:8081/pgptest with GET method
12
And notice the console messages for before and after encryption, that’s it guys…. Its pretty
simple to encrypt message using PGP in mule… isn’t it?
Complete flow is available for download
13

More Related Content

What's hot

What is VPN?
What is VPN?What is VPN?
What is VPN?
NetProtocol Xpert
 
TLS - Transport Layer Security
TLS - Transport Layer SecurityTLS - Transport Layer Security
TLS - Transport Layer Security
ByronKimani
 
Secure Sockets Layer and Transport Layer Security
Secure Sockets Layer and Transport Layer SecuritySecure Sockets Layer and Transport Layer Security
Secure Sockets Layer and Transport Layer Security
Al Mamun
 
Mule cloudhub
Mule cloudhubMule cloudhub
Mule cloudhub
D.Rajesh Kumar
 
Mule security
Mule  securityMule  security
Mule security
D.Rajesh Kumar
 
Introduction to SSL/TLS
Introduction to SSL/TLSIntroduction to SSL/TLS
Introduction to SSL/TLSkeithrozario
 
Introduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & SecureIntroduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & Secure
Brian Ritchie
 
SSL
SSLSSL
Mule security - jaas
Mule  security - jaasMule  security - jaas
Mule security - jaas
charan teja R
 
Mule fips 140-2 compliance support
Mule  fips 140-2 compliance supportMule  fips 140-2 compliance support
Mule fips 140-2 compliance support
D.Rajesh Kumar
 
Mule fips
Mule  fips Mule  fips
Mule fips
D.Rajesh Kumar
 
Mule esb with amazon s3 Integration
Mule esb with amazon s3 IntegrationMule esb with amazon s3 Integration
Mule esb with amazon s3 Integration
sivachandra mandalapu
 
Mule esb–api layer
Mule esb–api layerMule esb–api layer
Mule esb–api layer
charan teja R
 
Vpn 2
Vpn 2Vpn 2
Mule integration with Servicenow
Mule integration with ServicenowMule integration with Servicenow
Mule integration with Servicenow
Ramakrishna Narkedamilli
 
IPsec vpn
IPsec vpnIPsec vpn
IPsec vpn
sharetech
 
Types of VPN
Types of VPNTypes of VPN
Types of VPN
NetProtocol Xpert
 

What's hot (17)

What is VPN?
What is VPN?What is VPN?
What is VPN?
 
TLS - Transport Layer Security
TLS - Transport Layer SecurityTLS - Transport Layer Security
TLS - Transport Layer Security
 
Secure Sockets Layer and Transport Layer Security
Secure Sockets Layer and Transport Layer SecuritySecure Sockets Layer and Transport Layer Security
Secure Sockets Layer and Transport Layer Security
 
Mule cloudhub
Mule cloudhubMule cloudhub
Mule cloudhub
 
Mule security
Mule  securityMule  security
Mule security
 
Introduction to SSL/TLS
Introduction to SSL/TLSIntroduction to SSL/TLS
Introduction to SSL/TLS
 
Introduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & SecureIntroduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & Secure
 
SSL
SSLSSL
SSL
 
Mule security - jaas
Mule  security - jaasMule  security - jaas
Mule security - jaas
 
Mule fips 140-2 compliance support
Mule  fips 140-2 compliance supportMule  fips 140-2 compliance support
Mule fips 140-2 compliance support
 
Mule fips
Mule  fips Mule  fips
Mule fips
 
Mule esb with amazon s3 Integration
Mule esb with amazon s3 IntegrationMule esb with amazon s3 Integration
Mule esb with amazon s3 Integration
 
Mule esb–api layer
Mule esb–api layerMule esb–api layer
Mule esb–api layer
 
Vpn 2
Vpn 2Vpn 2
Vpn 2
 
Mule integration with Servicenow
Mule integration with ServicenowMule integration with Servicenow
Mule integration with Servicenow
 
IPsec vpn
IPsec vpnIPsec vpn
IPsec vpn
 
Types of VPN
Types of VPNTypes of VPN
Types of VPN
 

Viewers also liked

PGP Basic Lecture 01
PGP Basic Lecture 01PGP Basic Lecture 01
PGP Basic Lecture 01
Qaisar Ayub
 
pgp s mime
pgp s mimepgp s mime
pgp s mime
Chirag Patel
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
Pawan Arya
 
Network security and cryptography
Network security and cryptographyNetwork security and cryptography
Network security and cryptography
RajKumar Rampelli
 
Handson 1 (5/6)
Handson 1 (5/6)Handson 1 (5/6)
Handson 1 (5/6)
Roberta Cuel
 
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
Alex Adipati
 
PGP based social network
PGP based social networkPGP based social network
PGP based social network
José Moreira
 
Gnu Privacy Guard - Intro
Gnu Privacy Guard - IntroGnu Privacy Guard - Intro
Gnu Privacy Guard - IntroO. R. Kumaran
 
PGP and Enigmail
PGP and EnigmailPGP and Enigmail
PGP and Enigmail
Tania Silva
 
"Pretty Good Privacy": smuggling in the "Information Age"
"Pretty Good Privacy": smuggling in the "Information Age""Pretty Good Privacy": smuggling in the "Information Age"
"Pretty Good Privacy": smuggling in the "Information Age"
Federico Costantini
 
Symantec Brightmail Gateway 9
Symantec Brightmail Gateway 9Symantec Brightmail Gateway 9
Symantec Brightmail Gateway 9
Symantec
 
DataMotion-IG1-TheEvolutionofEncryption
DataMotion-IG1-TheEvolutionofEncryptionDataMotion-IG1-TheEvolutionofEncryption
DataMotion-IG1-TheEvolutionofEncryptionClint Walker
 
PGP presentation 2014
PGP presentation 2014PGP presentation 2014
PGP presentation 2014
Barbara Nadeem
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
DUET
 
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
Pushkar Dutt
 
PGP for Smarties
PGP for SmartiesPGP for Smarties
PGP for Smarties
Jan Schaumann
 

Viewers also liked (20)

PGP Basic Lecture 01
PGP Basic Lecture 01PGP Basic Lecture 01
PGP Basic Lecture 01
 
pgp s mime
pgp s mimepgp s mime
pgp s mime
 
Introduction to SSH & PGP
Introduction to SSH & PGPIntroduction to SSH & PGP
Introduction to SSH & PGP
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
 
Network security and cryptography
Network security and cryptographyNetwork security and cryptography
Network security and cryptography
 
Handson 1 (5/6)
Handson 1 (5/6)Handson 1 (5/6)
Handson 1 (5/6)
 
Pgp
PgpPgp
Pgp
 
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
 
E mail security
E   mail securityE   mail security
E mail security
 
PGP based social network
PGP based social networkPGP based social network
PGP based social network
 
Gnu Privacy Guard - Intro
Gnu Privacy Guard - IntroGnu Privacy Guard - Intro
Gnu Privacy Guard - Intro
 
PGP and Enigmail
PGP and EnigmailPGP and Enigmail
PGP and Enigmail
 
"Pretty Good Privacy": smuggling in the "Information Age"
"Pretty Good Privacy": smuggling in the "Information Age""Pretty Good Privacy": smuggling in the "Information Age"
"Pretty Good Privacy": smuggling in the "Information Age"
 
Symantec Brightmail Gateway 9
Symantec Brightmail Gateway 9Symantec Brightmail Gateway 9
Symantec Brightmail Gateway 9
 
DataMotion-IG1-TheEvolutionofEncryption
DataMotion-IG1-TheEvolutionofEncryptionDataMotion-IG1-TheEvolutionofEncryption
DataMotion-IG1-TheEvolutionofEncryption
 
Pgp
PgpPgp
Pgp
 
PGP presentation 2014
PGP presentation 2014PGP presentation 2014
PGP presentation 2014
 
Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)Secure Hash Algorithm (SHA-512)
Secure Hash Algorithm (SHA-512)
 
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
 
PGP for Smarties
PGP for SmartiesPGP for Smarties
PGP for Smarties
 

Similar to Using pgp with mule

Mulesoft Meetup Cryptography Module
Mulesoft Meetup Cryptography ModuleMulesoft Meetup Cryptography Module
Mulesoft Meetup Cryptography Module
ManjuKumara GH
 
CryptoGraphy Module in Mulesoft
CryptoGraphy Module in MulesoftCryptoGraphy Module in Mulesoft
CryptoGraphy Module in Mulesoft
shyamraj55
 
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptographyAhmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
Shekh Muenuddeen
 
Secure Mail Application's by Ashok Panwar
Secure Mail Application's by Ashok PanwarSecure Mail Application's by Ashok Panwar
Secure Mail Application's by Ashok Panwar
Ashok Panwar
 
Basics of GnuPG (gpg) command in linux
Basics of GnuPG (gpg) command in linuxBasics of GnuPG (gpg) command in linux
Basics of GnuPG (gpg) command in linux
Sanjeev Kumar Jaiswal
 
OpenPGP/GnuPG Encryption
OpenPGP/GnuPG EncryptionOpenPGP/GnuPG Encryption
OpenPGP/GnuPG Encryption
Tanner Lovelace
 
B. Nouri-Moghaddam et al Int. Journal of Engineering Research .docx
B. Nouri-Moghaddam et al Int. Journal of Engineering Research .docxB. Nouri-Moghaddam et al Int. Journal of Engineering Research .docx
B. Nouri-Moghaddam et al Int. Journal of Engineering Research .docx
ikirkton
 
G43053847
G43053847G43053847
G43053847
IJERA Editor
 
PGP Encryption And Decryption With Mule ESB
PGP Encryption And Decryption With Mule ESBPGP Encryption And Decryption With Mule ESB
PGP Encryption And Decryption With Mule ESB
Jitendra Bafna
 
Privacy is a UX problem (David Dahl)
Privacy is a UX problem (David Dahl)Privacy is a UX problem (David Dahl)
Privacy is a UX problem (David Dahl)
Future Insights
 
Digital Certified Mail
Digital Certified MailDigital Certified Mail
Digital Certified Mail
Matthew Chang
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
PBU-Intro_to_PGP
PBU-Intro_to_PGPPBU-Intro_to_PGP
PBU-Intro_to_PGP
auremoser
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
Slide cipher based encryption
Slide cipher based encryptionSlide cipher based encryption
Slide cipher based encryption
Mizi Mohamad
 
Mule security - pgp
Mule  security - pgpMule  security - pgp
Mule security - pgp
vishnukanthro45
 
Mulesoft encryption
Mulesoft encryptionMulesoft encryption
Mulesoft encryption
Jagruti Sakhare
 
SYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTS
SYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTSSYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTS
SYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTS
acijjournal
 
IRJET- Audit Free Cloud Via Deniable Attribute based Encryption
IRJET- Audit Free Cloud Via Deniable Attribute based EncryptionIRJET- Audit Free Cloud Via Deniable Attribute based Encryption
IRJET- Audit Free Cloud Via Deniable Attribute based Encryption
IRJET Journal
 

Similar to Using pgp with mule (20)

Mulesoft Meetup Cryptography Module
Mulesoft Meetup Cryptography ModuleMulesoft Meetup Cryptography Module
Mulesoft Meetup Cryptography Module
 
CryptoGraphy Module in Mulesoft
CryptoGraphy Module in MulesoftCryptoGraphy Module in Mulesoft
CryptoGraphy Module in Mulesoft
 
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptographyAhmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
 
Secure Mail Application's by Ashok Panwar
Secure Mail Application's by Ashok PanwarSecure Mail Application's by Ashok Panwar
Secure Mail Application's by Ashok Panwar
 
Unit 4
Unit 4Unit 4
Unit 4
 
Basics of GnuPG (gpg) command in linux
Basics of GnuPG (gpg) command in linuxBasics of GnuPG (gpg) command in linux
Basics of GnuPG (gpg) command in linux
 
OpenPGP/GnuPG Encryption
OpenPGP/GnuPG EncryptionOpenPGP/GnuPG Encryption
OpenPGP/GnuPG Encryption
 
B. Nouri-Moghaddam et al Int. Journal of Engineering Research .docx
B. Nouri-Moghaddam et al Int. Journal of Engineering Research .docxB. Nouri-Moghaddam et al Int. Journal of Engineering Research .docx
B. Nouri-Moghaddam et al Int. Journal of Engineering Research .docx
 
G43053847
G43053847G43053847
G43053847
 
PGP Encryption And Decryption With Mule ESB
PGP Encryption And Decryption With Mule ESBPGP Encryption And Decryption With Mule ESB
PGP Encryption And Decryption With Mule ESB
 
Privacy is a UX problem (David Dahl)
Privacy is a UX problem (David Dahl)Privacy is a UX problem (David Dahl)
Privacy is a UX problem (David Dahl)
 
Digital Certified Mail
Digital Certified MailDigital Certified Mail
Digital Certified Mail
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
PBU-Intro_to_PGP
PBU-Intro_to_PGPPBU-Intro_to_PGP
PBU-Intro_to_PGP
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
 
Slide cipher based encryption
Slide cipher based encryptionSlide cipher based encryption
Slide cipher based encryption
 
Mule security - pgp
Mule  security - pgpMule  security - pgp
Mule security - pgp
 
Mulesoft encryption
Mulesoft encryptionMulesoft encryption
Mulesoft encryption
 
SYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTS
SYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTSSYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTS
SYMMETRIC-KEY BASED PRIVACYPRESERVING SCHEME FOR MINING SUPPORT COUNTS
 
IRJET- Audit Free Cloud Via Deniable Attribute based Encryption
IRJET- Audit Free Cloud Via Deniable Attribute based EncryptionIRJET- Audit Free Cloud Via Deniable Attribute based Encryption
IRJET- Audit Free Cloud Via Deniable Attribute based Encryption
 

Recently uploaded

Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 

Recently uploaded (20)

Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 

Using pgp with mule

  • 1. PGP (Pretty Good Privacy) with Mule - Anil Kumar. V 1
  • 2. PGP in a Nutshell What is PGP PGP - Pretty Good Privacy, was created by Phil Zimmermann, is a data encryption and decryption program for data privacy communicated between the two parties. PGP works by encrypting a message using a public key that’s tied to a specific user; when that user receives the message, they use a private key that is known only to them to decrypt it. How secure is PGP While it is impossible to say any encryption methodology is safe and secure, PGP is generally considered as being extremely safe and secure. Bruce Schneier, an internationally renowned security technologist, stated PGP is the encryption methodology that is closest to get military-grade encryption and there are no practical weaknesses. 2
  • 3. 3 How PGP can be used with Mule and where? Mule supports security with Anypoint Enterprise Security module. First thing, we need to make sure to install the Anypoint Enterprise Security module in Anypoint Studio i.e., Mule IDE. In order to add Security module to Anypoint Studio, please follow the instructions here. Once the Anypoint Enterprise Security module is installed, you should see a new palette group called Security in the studio like this
  • 4. 4 Encryption Module Mule can encrypt the entire payload or specific part s of the payload depending upon the encryption strategy. Mule supports 3 encryption strategies; Note: PGP is generally considered as being extremely safe and secure over JCE and XML Encrypter’s. Encryption Strategy Name Characteristics JCE Encrypter (Default) • Encrypts Stream, byte[] or String type of payload XML Encrypter • Encrypts String type of payload • Encrypts full payload or partial using xpath PGP Encrypter • Encrypts Stream, byte[] or String type of payload • Adds the processing overload
  • 5. 5 Lets consider a small use case to demonstrate on how to implement PGP encryption in mule with ‘Encryption Processor’ Use case: In this article, we will be implementing a flow which will fetch data from a database table and then send the data to a queue in Active MQ, encrypt the data before sending it to queue. Components used in this use case: • HTTP To trigger the flow • Database Fetch the data from database • JMS Enqueue/Dequeue messages • Encryption PGP Encryption to encrypt the data • Object to Byte Array Convert payload object into byte array for PGP to process • Byte Array to Object Convert payload from byte array to object after PGP process • For Each Iterate over the database results
  • 6. 6 Create new project viz., pgp_test create project in Anypoint Studio, by selecting the top menu bar select File > New > Mule Project
  • 7. 7 After project is created, create a flow with the following components and transformers in the same order: Flow should look like 1. HTTP URL : http://localhost:8081/pgptest 2. Database Configure to select data from a simple table, something like Employee table in your local/remote db 3. For Each 4. Object to Byte Array 5. Encryption Refer next slide/page 6. JMS Point to a queue viz., ‘employee’ in your local Active MQ
  • 8. 8 Lets see what is required to configure the ‘Encryption’ module in detail: 1). Configure the Encryption module to use the PGP_ENCRYPTER as per below 2). Add a Global Encryption Configuration by clicking on the Connector Configuration + icon under Basic Settings and set the value to PGP_ENCRYPTER for Default Encrypter as shown below
  • 9. 9 3). Select the ‘Pgp Encrypter’ tab and select the ‘Define attributes’ What is a key ring? In secure data-transmission, a key ring consists of a public key and its corresponding private key both of which are required to read the data. You can use my Public Key Ring & Secret Key Ring files and use them in the flow. If you intend to do so, set the rest of the values as follows: Secret Alias Id : 8923421754335606047 Secret Passphrase : mulepgp Principal : mulepgp
  • 10. 10 4). If you prefer to generate your own key ring files, you can make use the gpg command- line utility. GPG Keychain Access for Mac OS Gpg4win for Windows This screenshot shows how my keys were generated using the gpg command from Windows. Note that the pubring.gpg and secring.gpg key files will be created in a hidden directory called `gnupg` under the user home directory. On Windows, this will be in C:Users<username>AppDataRoaminggnupg. The Principal will be the USER-ID which is a combination of the Real Name, Email Address and Comment. To keep it simple, you can just use choose a simple Real Name and leave email and comment blank. In my example, I simply set the Real Name to `mulepgp` and the Secret Passphrase to `mulepgp`. Determining the numeric value for the `Secret Alias Id` is not obvious. The GPG utility does not show this numeric value. The best way to derive this is by letting Mule give you some clues. Put any random number initially for the `Secret Alias Id` and run it to let Mule throw an error on purpose. In the exception thrown from the console output, it will show you a message with the keys you can use. Thanks Mariano Gonzales for the above tips
  • 11. 11 5). Okay….. We did talk too much isn’t it? Now its time to test the talk Run the flow as Mule Application….. Check the console for successful application deployment 6). Open Postman or something similar then type the URL, http://localhost:8081/pgptest with GET method
  • 12. 12 And notice the console messages for before and after encryption, that’s it guys…. Its pretty simple to encrypt message using PGP in mule… isn’t it? Complete flow is available for download
  • 13. 13