Skip to Content
Technical Articles
Author's profile photo Appala Naidu Uppada

B2B Capabilities in SAP Cloud Integration – Part 2

Introduction:

In the part 1 of this blog series, you would have understood how to setup and configure AS2 Mendelson tool to post a simple AS2 message without encryption and signing to SAP Cloud Integration tenant.

In this blog, I would like to explain how to enhance a simple AS2 scenario by introducing AS2 features such as compression, signing and encryption for exchanging messages between two B2B partners.

I would discuss the following scenarios:

  • Scenario 1: Configuring and posting AS2 message with Compression, Signing, Encryption and Synchronous MDN.
  • Scenario 2: Configuring and posting AS2 message with Compression, Signing, Encryption and signed Asynchronous MDN.

1. Configuration:

In a typical B2B scenario, B2B Sender compresses, signs (Senders’ private key) and encrypts (Receivers’ public key) while sending the message. At B2B Receiver’s side, the receiver decrypts (Receivers’ private key), verifies the signature (Senders’ public key) and finally decompresses the message.

More details about public and private keys can be found here .

Here I am using private key Key2 of AS2 Mendelson tool for signing and a public certificate (e.g: picouser in my case) from SAP Cloud Integration tenant for encryption purpose.

For the AS2 secure message exchange to happen between Mendelson tool and SAP Cloud integration tenant, we need to exchange the public keys between these two applications.

   1.1   Export public certificate of Key2 from AS2 Mendelson Tool and Import on to SAP Cloud Integration tenant:

Perform the steps mentioned below to export the public certificate of AS2 Mendelson to SAP Cloud Integration Tenant.

a) Navigate to File->Certificates->Sign/Crypt in the AS2 Mendelson tool.

b) Right click on the Key2 alias and select “Export certificate (for your trading partner)”

c) Export the certificate as Key2.cer

d) Import the above exported certificate to SAP Cloud Integration tenant.

Follow the blog  Key store Monitor on how to manage the key store entries.

 1.2  AS2 Local Station Configuration:

Modify the security properties of the Local station pointing to Key2 and keep the all other properties as it was configured in Part 1.

 1.3  ABCCompany Configuration:

a) Export the public certificate that would be used for Encryption from SAP Cloud Integration tenant as shown below.

b) Import the certificate onto mendelson tool from File->Certificates->Sign/Crypt as shown below.

c) Choose the above imported certificate (e.g: in my case picouser ) for encryption and signature certificates and algorithms.

 2. Scenario 1: Configuring and posting AS2 message with Compression,Signing, Encryption and Synchronous MDN:

The scenario involves the B2B Sender sending a EDI document which is compressed, signed and encrypted. The B2B Receiver returns MDN (The Internet messaging format used to convey a receipt.) to the sender during the same HTTP session as the sender’s original message.

 2.1   ABCCompany configuration:

a) Select the Compress outbound messages in Send settings

b) Select Request sync MDN option from MDN settings

2.2   AS2 Sender Adapter Configuration:

a) Modify the security settings as shown below and keep other properties as it was done

in part 1

b) Save and Deploy the integration flow

2.3  Post AS2 message from AS2 Mendelson:

Message should be processed successfully.

 

3. Scenario 2: Configuring and posting AS2 message with Compression, Signing, Encryption and signed Asynchronous MDN

The scenario involves the B2B Sender sending a EDI document which is compressed, signed and encrypted. The B2B Receiver returns MDN (The Internet messaging format used to convey a receipt.) to the sender on a different   communication session than the sender’s original message session.

       Prerequisite: This scenario involves sending an Asynchronous MDN. You need to configure cloud connector to establish the communication between SAP Cloud integration tenant and on- premise system where mendelson has been installed.

You can refer the setup guide or blog for setting up the cloud connector for more details.

a) Create a Virtual To Internal system mapping on Cloud connector as shown below.

b) Give access to all Path and sub-paths to the mapped system

3.1   ABCCompany configuration: 

In the AS2 Mendelson tool, the MDN settings of ABCCompany should have the below configuration.

  • Request Async MDN selected.
  • Request signed MDN option is checked.

 3.2  AS2 Sender Adapter Configuration:

a) Change the MDN settings of AS2 Sender adapter to have the configuration

  • Provide the alias name of the private key from SAP Cloud Integration tenant.
  • Select Proxy type as “On-Premise”.

Keep the other properties of AS2 Sender as configured in scenario 1.

b) Save and Deploy the integration flow.

3.3 Post AS2 message from mendelson tool:   

Message should be processing successfully.

Take away:

We have learnt on how to configure and send AS2 messages securely using signing and encryption.

In the next part of this blog series, I would extend this simple AS2 inbound scenario to use the EDI Flow steps to transform the ANSI X12 bulk payload to split, validate and convert to IDOC document.

 

 

 

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ruchir Sinha
      Ruchir Sinha

      Very detailed and nicely explained blogs. Well done!! Looking forward to more such blogs.

      Author's profile photo Roberto Cantero Segovia
      Roberto Cantero Segovia

      Goog job!

      Author's profile photo Nagavenkata Grandhi
      Nagavenkata Grandhi

      Very informational. Thank you.

      Author's profile photo Raghu Neelarapu
      Raghu Neelarapu

      Nice work! Looking forward to Part3 and Part4 - Thank you

      Author's profile photo Kefei Dong
      Kefei Dong

      Nice Work! Thank you!

      Author's profile photo Ravish Jha
      Ravish Jha

      Nice work. Waiting for part 3 and 4. Any plans to release them ?

      Author's profile photo Dinesh M
      Dinesh M

      Hi All,

      One general query regarding the execution.

      When you trigger a .txt file from Mandelson to CPI, which files will be accepted by CPI & processed and which will be ignored or give negative MDN!!? Could anyone clarify

      Since there is no filename in CPI sender connection, I got this doubt

      Is it accepting all the incoming messages based on checking only the Message Format?

      If you could show the view of how the file looks like, it will clear all my doubts