Monday, June 30, 2025
JDBC Adapter - Select, Insert, Delete
In this blog, I will explain you how to create JDBC alias (cloud/on-premise) connection and perform some basic SELECT, INSERT and DELETE Operations.
How to create JDBC Connection alias..?
In real-time, you will get DB details either from infra-team or admin team..
Basically, you need DB Host, Port, User-Name, Password and Database name.
and based on the data base, you need to prepare JDBC URL.
Go to Monitor>Integrations and APIs>Manage Security> JDBC Material
Click on Add, select Database type "PostgreSQL" or SAP HANA Cloud or SAP HANA Platform (On-Premise)..etc
Note: If the Database is On-Premise, then you need to install JDBC Driver.
Specify all the required details and Deploy the connection and note the connection alias name.
In my example, the connection alias is "postgresql_db"
For PostgreSQL, the JDBC URL is ..
JDBC URL: jdbc:postgresql://host:port/database
Based on your database, you need to build the URL (if you're not sure, just google it) :-)
Next, create simple iFlow as shown below..
Inside Content Modifier step, specify your SQL query.
select * from "doc"."emprecord" limit 100;
where "emprecord" is the table name, you need to change it as per your table name.
Content Modifier Step:
Once flow is ready, then deploy it and test it.
DB results:
Sample queries for your ref:
- create table emprecord( empid int, emplastname varchar(255), empfirstname varchar(255), empage int);
- insert into "doc"."emprecord"(empid,emplastname, empfirstname, empage) values (1003,'HHR','Lalit',25);
- select empid,emplastname,empfirstname, empage from "doc"."emprecord" limit 100;
- select * from "doc"."emprecord" limit 100;
Thanks for reading :-)
Sunday, August 4, 2024
PGP Security
In this blog, I want to explain what is PGP encryption and it will be used in SAP CPI.?
What is PGP ?
Pretty Good Privacy (PGP) is a security program used to decrypt and encrypt email and authenticate email messages through digital signatures and file encryption.
PGP(Pretty Good Encryption) was first designed and developed in the year 1991 by Paul Zimmerman, a political activist. PGP software was owned and sold by a company called "PGP Corporation", which was founded in 2002 then sold to "Symantec" in 2010.
Email is a main attack method for cyber criminals who can easily forge messages by using a victim’s name or identity. PGP aims to solve this and enhance email security by encrypting the data to make the communication method is more private.
PGP was one of the first public-key cryptography software publicly available for free download. Initially, it was used to enable individual users to communicate on bulletin board system computer servers. Later, it was standardized and supported by other applications such as email. It has now become a core standard in email security and has been widely used to protect individuals and organizations data.
The data encryption program provides cryptographic authentication and privacy for data used in online communication. This allows PGP to be used for encrypting and decrypting text messages, emails, and files.
How PGP Works
Key Generation:
- PGP uses a pair of cryptographic keys: a public key and a private key.
- The public key is shared openly with anyone who wants to send you encrypted messages.
- The private key is kept secret and is used to decrypt messages encrypted with the corresponding public key.
Encrypting a Message:
- When someone wants to send you an encrypted message, they use your public key to encrypt the message.
- PGP also compresses the message before encryption to save space and improve security.
- After encryption, the message can only be decrypted by your private key.
Decrypting a Message:
- Upon receiving an encrypted message, you use your private key to decrypt it.
- After decryption, the message is decompressed to retrieve the original content.
Signing a Message:
- PGP also allows for digital signatures, which authenticate the identity of the sender.
- The sender creates a hash (a fixed-size string of bytes) of the message and then encrypts this hash with their private key to create a digital signature.
- The recipient can then use the sender's public key to decrypt the signature and compare it with their own hash of the message to verify its authenticity and integrity.
Verification:
- To verify the authenticity of a signed message, the recipient decrypts the signature using the sender's public key and compares the resulting hash with a hash of the received message.
- If the two hashes match, the recipient can be confident that the message has not been altered and that it was indeed sent by the owner of the private key.
Example Workflow:
- Alice generates a public/private key pair using PGP.
- She shares her public key with Bob.
- Bob writes a message to Alice, encrypts it with her public key, and sends it.
- Alice receives the encrypted message and uses her private key to decrypt it.
- Optionally, Bob signs the message with his private key, and Alice uses Bob's public key to verify the signature, ensuring the message's authenticity.
Applications of PGP:
- Email Encryption: PGP is commonly used to encrypt emails, ensuring that only the intended recipient can read them.
- File Encryption: PGP can encrypt files, ensuring that only authorized users can access them.
- Authentication: PGP digital signatures are used to verify the identity of the sender and the integrity of the message.
Saturday, August 3, 2024
Log Trace
In this blog, I want to share important points of Log Trace for IFLOWS.
Log level in SAP Cloud Platform Integration (CPI) is a critical setting that determines the amount of detail captured in the Message Processing Log (MPL). It directly impacts the troubleshooting and monitoring capabilities of your integration
Log levels in CPI include:
NONE: No data is recorded.
INFO: Basic information about message processing steps and detailed information about the last processing step for failed messages.
ERROR: Logs are created for failed executions only
DEBUG
It should be used in test environments only.
Log Level 'Debug' expires after a configured time period, typically 24 hours.
After expiry the log level switches back to the previous log level 'Info'.
TRACE:
It should be used in test environments only.
Log Level 'Trace' expires after a configured time period, typically 10 mins.
After expiry the log level switches back to the previous log level 'Info'.
Trace data is removed after the configured retention period, typically 1 hour.
- INFO level is often sufficient for identifying general issues and error points.
- For complex or intermittent problems, increasing the log level to DEBUG or TRACE can provide invaluable insights into the message flow and potential root causes.
- High log levels can impact performance, especially in production environments.
- Balancing detailed logging with performance considerations is essential.
- Sensitive data might be logged at higher levels. So carefully consider the information logged, especially in production environments.
- Log data can be used for monitoring integration flow health and performance.
- Appropriate log levels ensure you have the necessary data for monitoring.
OData Adapter | Sender and Receiver
What is OData Adapter? An OData Adapter is an integration component that lets cloud platforms or enterprise systems connect to and communic...
-
Externalization refers to the practice of storing configuration parameters, credentials, and other dynamic values outside the integration f...
-
In this blog, I am going to explain what is value-mapping, importance and how to implement it.? Value Mapping in SAP CPI is a critical featu...
-
Introduction Groovy Script is an important component in the SAP Integration Suite, especially in the place of SAP Cloud Platform Integration...