2

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!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Sweta Sharma
  • 2,404
  • 4
  • 21
  • 36
  • 1
    1. Why not? 2. Alternatives to what? 3. AFAIK no. 4 Only from scratch [step-by-step](https://www.ibm.com/support/pages/setting-sap-secure-network-communications-snc-and-using-it-pack-sap-applications-and-bw) to define all the configuration steps in dockerfile or Docker Compose – Suncatcher May 05 '21 at 11:49
  • Thanks so much Suncatcher for your reply and for sharing the information. Alternatives to writing Dockerfile from scratch. Should I go ahead defining step by step all the configuration steps using dockerfile? – Sweta Sharma May 05 '21 at 12:03
  • I'm afraid yes, you should. I know no OOTB-solution for SNC. – Suncatcher May 05 '21 at 12:13
  • what is the OOTB solution? Also, Can I post my Dockerfile solution Could you please review it. – Sweta Sharma May 05 '21 at 12:15
  • OOTB = out of the box – Suncatcher May 05 '21 at 12:18

1 Answers1

1

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
Suncatcher
  • 10,355
  • 10
  • 52
  • 90
  • Yes, I have a Java-based Spring app that connects to the SAP system externally. However, I need to containerize this Spring boot app. I was wondering once I write a Dockerfile that contains a command to run a simple Java application How will it connect to the SAP externally? Should I include those configurations in Dockerfile (The JCO library and parameters related to it)? – Sweta Sharma May 05 '21 at 12:27
  • This question is more for Docker pro's, I'm not familiar with best-practice here – Suncatcher May 05 '21 at 13:02
  • Thank you so much Suncatcher for your time and for sharing all the information. – Sweta Sharma May 05 '21 at 14:07
  • So give kudoz if you find it useful – Suncatcher May 05 '21 at 15:10