Friday, August 27, 2021

OIC - Business identifiers

Introduction:
  • Business Identifiers helps to track the messages from monitoring dashboard very easily. 
  • Suppose you are subscribing an event - supplier details from ERP and you want to track the meseages based on the unique supplier id or POid that you can achieve using this feature.
  • Without enabling the tracking or business fields, you can not activate the integration.
  • Max 3 identifiers can be assigned during design time. 
    • One is primary identifier. 
    • Others two are secondary or business identifiers.
  • One error sign will be showing in the integration untill you add the tracking fields.

Add tracking and monitor:

Step1: Whether you have a soap or rest triggerd service, go to the actions and tracking and add the 3 fields, Here i added empid as primary and ename and dept fields as secondary fields.


Step2: Go to the monitoring and integrations. Empid will be added as primary identifier and ename and dept will be added in the business identifiers



Tuesday, August 24, 2021

OIC - Using Stage file to encrypt and decrypt files.

Use Case: Here, We will download a csv file using FTP connection and encrypt the file using Stage action and then write the file using FTP connection and then read the encrypted the file using FTP connection and decrypt the file using Stage and write again to file location using FTP.

Implementation steps:

Step1: First We must have imported the PGP private and public keys to settings certificates.

https://soalicious.blogspot.com/2021/08/oic-import-pgp-keys-to-use-in-stage.html

Step2: Download the file using FTP connection.


Step3: Encrypt the file using PGP public key using Stage. Provide folllwing details:

File reference : Downloaded file response ref
File Name: Any name of the encrypted file.
Output Directory: logical directory like /writeEncrypt
PGP key to encrypt: public key

Step4: Write the file to a location and map the stage encrypted response file ref to write file reference.




Step5: Read the file using FTP connection.


Step6: Drag and drop a Stage and decrypt the file. Provide the following details:

File Reference: Read file reference
File Name: any name for decryption.
Output Directory: logical one like /writeDecrypt
PGP key to decrypt: private key



Step7: Write the file using FTP and map the decrypted file response reference to write file reference.



The Integration flow will look like below:


Source CSV file/Decrypted file:


Encrypted file:




OIC - Import PGP keys to Setting Certificates to use in Stage file to encrypt and decrypt files.

Here I will show you how to import the PGP keys in settings Certificate section which will be later on used in Stage file for encrypting and decrypring files.

Import steps:

Public Key is used for Encryption and Private Key for decryption. In order to use encrypt/decrypt files we have to upload PGP keys in OIC.

To upload PGP Keys:

Step1: From OIC Home page→ Settings → Certificates page. Click Upload at the top of the page.

Step2: In the Upload Certificate dialog box, select the certificate type. Each certificate type enables Oracle Integration Cloud to connect with external services. 

PGP: Use this option for bringing PGP Certificates.

Public Key:

Enter Alias Name and Description

Select Type as PGP

Select Category as Public

Select PGP File, Click Browse and select the public key file to be uploaded

Select ASCII-Armor Encryption Format

Select Cipher Algorithm

Click Upload.



Private key:

Enter Alias Name and Description

Select Type as PGP

Select Category as Private

Select PGP File, Click Browse and select the private key file to be uploaded

Enter the PGP Private Key Password of the private key being imported.

Click Upload.



For more details of oic certificate management, follow my below blog:

OIC - Decrypt file using FTP download operation and read reference in stage activity

Use Case: Here, we will download (with decrypt) an encrypyed csv file without schema option  and then read file reference using stage read entire file option.

Implementation steps:

Step1: First create FTP connection following below blog:

https://soalicious.blogspot.com/2021/08/oic-create-sftp-connection-with-pgp.html

Step2: Create an orchestrated intwgration and drag and drop FTP connection and download the file with pgp encrypt option.


Step3: add the stage activity and choose the read the entire file option and provide the file reference from download response object.


Step4: provide the csv sample file for reading the reference.


Now the integration flow will like as below:

Save and test.

Encrypted csv file:



From Monitoring - view activity stream:



OIC - Encrypt and Decrypt using FTP adapter and PGP

Use Case: Here, we will first read a csv file and then encrypt the file (with Write) and then read the encrypted file and decrypt the file(with Write).

Implementation steps:

Step1: Create a FTP connection using PGP keys. Follow below blog:

https://soalicious.blogspot.com/2021/08/oic-create-sftp-connection-with-pgp.html

Step2: Create a scheduled orchestrated integration and drag and drop FTP connection and configure with read operation with input directory and filename details and provide a CSV file as schema reference.


Step3: drag and drop FTP connection and Write with output directory and filename and select PGP encryption option.


Step4: map the read file details to write fields.


Step5: drag and drop FTP server and read the encrypted file with inpit directory and file name details.


Step6: map the write file fields to read encrypted file fields.


Step7: Drag and drop FTP with Write operation and select Perform PGP Decryption option as below.


Step8: map the file fields


Step9: add tracking and now the integration will like as below. Save it and test.


Input CSV file:


Encrypted file:


Decrypted file:



OIC - Create SFTP connection with PGP private and public keys

Here I will show you what details you need to create a SFTP connection using PGP keys to use in encrypting and deceypting files in integration flow elements.

Step1: First create PGP keys following below blogs:

https://soalicious.blogspot.com/2020/10/oic-create-pgp-key-to-use-in-ftp.html


Step2:  Go the connection page and creatw new connection as FTP and provide the following connection properties.

FTP server host address
FTP server port
SFTP connection: yes
Step3: Add security policy as FTP Server Access policy.


Step4: Add User name, Password and public pgp key.

Step5: Add ASCII armor Encryption format as Yes , cipher algorithm as AES256, and upload PGP private key and private key password.


Step6: Save and test.

Tuesday, August 17, 2021

OIC - How to migrate integrations using OIC Rest APIs

Export an Integration:

/ic/api/integration/v1/integrations/{id}/archive

Verb: Get

Import(Add) an Integration:

/ic/api/integration/v1/integrations/archive

Verb: Post

It imports a new integration that was previously exported. To submit an import request, the integrations must not be present in the environment.

Import (Replace) an integration:

/ic/api/integration/v1/integrarions/archive

Verb: Put

Updates an existing integration with the same name that was exported previously.

Note: importing an integration with a different user name or version that what was exported is not supported 

Implmentation steps:

TBD


Featured Post

OIC - Creating Folders in SharePoint Using Microsoft Graph API 1.0 in Oracle Integration Cloud

Use Case Many businesses need to automate folder creation in SharePoint based on dynamic inputs. A common requirement is to create folders ...