Basic File Encryption and Decryption in OIC

To Encrypt or Decrypt we will need a set of keys.

We will use Public Key to Encrypt the Data and Private Key to Decrypt the Data.

I took this image from https://comodosslstore.com/blog/public-key-and-private-key-pair-how-it-works.html


We can now visit https://pgpkeygen.com/ to generate pair of Keys. Or below method can be followed too. However pgpkeygen is widely used.

I used below settings.

NOTE : Copy the password in a notepad before you forget it. We will need this password while configuring SFTP Connection in OIC.


This gave me two files like below :-

Now create a SFTP Connection and configure like below :-

Test and Save the Connection.

The Integration looks like below :-

Rest Adapter Summary

Rest Sample Payload for inline methods.

{
"firstName" : "x",
"lastName" : "Y"
}

I have created the below simple CSV file to use in File Write Operation:-

Creating the file with Encryption.
Download Operation
Mapping

Once activated and Tested got a successful response.

Thanks for reading.

Tips:

In next Step Try using password free Authentication for SFTP Server.
Use DVMs to map the filename patterns and paths.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.