Warm tip: This article is reproduced from serverfault.com, please click

How to configure SAP SNC using Docker

发布于 2021-05-04 11:44:29

I need to containerize a service that talks to a SAP system. The service is written using Spring Boot.

I have a document that performs steps manually on Linux Machine which will help to connect to the SAP system. The steps it follows are:

  1. Download required files
  2. Switch to the USer
  3. Unpack those files
  4. Create Sym Link
  5. Prep the certs and key
  6. Generating the PSE
  7. Add the SAP Root and intermediate certificate to the PSE and many more.

I'm thinking to write a Dockerfile that included all the above steps. Don't know of any other alternatives for now.

Few Queries:

  1. Is it a good idea to write a Dockerfile that has all the steps which we do any Linux machine manually which will also help me containerize the service which talks to the SAP system.
  2. Is there any other alternatives or libraries available to achieve the same.
  3. Does the docker file already exist which will help me to connect to the SAP system.
  4. How can I configure SAP SNC in my application using Dockerfile.

Can someone help me?

Appreciate all your help! Thanks in advance!

Questioner
Sweta Sharma
Viewed
11
Suncatcher 2021-06-16 17:54:14

If you have a Java-based Spring app you can utilize SAP Jco library which can be used to connect to SAP system externally. The configuration steps are described here:

https://help.mulesoft.com/s/article/Enabling-SNC-in-SAP-connector

It is given in Mulesoft help but the main points will be the same for any Java-based system.

The most important JCo parameters that need to be set up for SNC:

Parameter Name Description
jco.client.snc_mode SNC mode 1: SNC is activated 0: SNC is not activated
jco.client.snc_lib SNC library path Specifies the path and file name of the external library. The default is the system-defined library as defined in the environment variable SNC_LIB. Example: C:SAP\J2EE_Engine\SAPCrypto\libs\apcrypto.dll
jco.client.snc_qop SNC level Specifies the level of protection to use for the connection. 1: Authentication only 2: Integrity protection 3: Privacy protection (default) 8: Use the value from snc/data protection/use on the SAP application server 9: Use the value from snc/data_protection/max on the SAP application server
jco.client.snc_myname SNC name Specifies the SNC name. This parameter should be set to ensure that the correct SNC name is used for the connection. Example: p:CN=SAPJ2EE, O=MyCompany, C=US
jco.client.snc_partnername SNC partner Specifies the SAP application server's SNC name. It can be found in the SAP profile parameter snc\identity\as. Example: p:CN=ABC, O=MyCompany, C=US