Table of Contents

SNC ABAP connection

This chapter describes how to set the SAP Secured Network Communication (SNC) protocol in
 an ABAP connector. In the following sections, the SAP server will be called « SNC server » 
and the collector be called « SNC client ».

Disclaimer

Overview

The SNC configuration consists of those main steps:

SNC libraries

SNC cryptographic libraries and certificates must be installed within a dedicated folder
enabling the SNC client to handle PSE certificates

Environment Variables

SECUDIR=<YOUR_SNC_FOLDER>/sec
PATH=$PATH:$SECUDIR
export $SECUDIR

Create PSE of the SNC client

We use the SNC configuration scenario called « Using Individual PSEs for Components ».
 
 Got absolute PSE path "/home/notroot/SNC/sec/PROMONITOR.pse".
Please enter PIN: *********
Please reenter PIN: *********
get_pse: Distinguished name of PSE owner: CN=PROMONITOR, OU=REDPEAKS, O=REDPEAKS, C=CH
 Supplied distinguished name: "CN=PROMONITOR, OU=REDPEAKS, O=REDPEAKS, C=CH"
 Creating PSE with format v2 (default)
 Generating key (RSA, 1024-bits) ... succeeded.
 certificate creation... ok
 PSE update... ok
 PKRoot... ok
Generating certificate request... ok.
PKCS#10 certificate request for "/home/notroot/SNC/sec/PROMONITOR.pse":

-----BEGIN CERTIFICATE REQUEST-----
MIIBhzCB8QIBADBIMQswCQYDVQQGEwJDSDERMA8GA1UEChMIUkVEUEVBS1MxETAP
BgNVBAsTCFJFRFBFQUtTMRMwEQYDVQQDEwpQUk9NT05JVE9SMIGfMA0GCSqGSIb3
DQEBAQUAA4GNADCBiQKBgQD8PaynQAdux0nqVWU83rtqi79meyCWSynEgbDEzQnv
onNtDSV/hlH52Us8v8jXYO3ruujCWGgSJwhTgmtUy5uTbXQSZMfkFoqLN/DdD3e2
bf28a0CAUcMvdiBAlydzpKFrx5U+bv+XZp7XykBrkLEyWXYWyy1KtdfXEdHZYdKO
nwIDAQABoAAwDQYJKoZIhvcNAQEFBQADgYEA8nmBL+cmjoLmhYin49MVCC9tCiMN
ZaU0KtpMmU2nTRD20SscfB7RgUp3EqnxLn+c2hzw2CMSMOb8enfPiGWTkPSbF26P
dKBXbr6oD8Fanl+tkRvrkX7hKBWKOUr/uR+l+cKVVeY1mCzZOcC1OkC1ygulEAyP
k0mlWWkOvDCNSeg=
-----END CERTIFICATE REQUEST-----

Creating the SNC client certificate

  Opening PSE "/home/notroot/SNC/sec/PROMONITOR.pse"...
 No SSO credentials found for this PSE.
Please enter PIN: *********
 PSE (v2) open ok.
 Retrieving my certificate... ok.
 Writing to file (PEM-framed base64-encoded)... ok.

Importing of the client certificate in the SAP SNC server

This operation will tell the system to trust the SNC client

Exporting of the SAP SNC server certificate

This operation will tell the  SNC client to trust the system

On the SAP system:

On the SNC client:

 Opening PSE "/home/notroot/SNC/sec/PROMONITOR.pse"...
 No SSO credentials found for this PSE.
Please enter PIN: *********
 PSE (v2) open ok.
 retrieving PKList
 Adding new certificate from file "S4H.crt"
----------
Subject : CN=CLOUD-SAA100-CA, DC=CLOUD, DC=AGENTIL, DC=NET
Issuer  : CN=CLOUD-SAA100-CA, DC=CLOUD, DC=AGENTIL, DC=NET
Serialno: 73:E9:56:E2:33:DB:C7:8C:49:30:82:30:83:E5:A3:E2
KeyInfo : RSA, 2048-bit
Validity  -  NotBefore:   Wed Jan 27 11:50:47 2016 (160127105047Z)
              NotAfter:   Sat Nov  4 20:41:43 2119 (21191104194143Z)
----------------------------------------------------------------------------

 PKList updated (1 entries total, 1 newly added)

Creating the credential file for the SNC client user account

You have to allow the OS account of the SNC client application to access
 the PSE, by creating the credential file “cred_v2”.
  
 running seclogin with USER="notroot"
 creating credentials for secondary user "promonitor" ...
Please enter PIN: ****
 Added SSO-credentials (#0) for PSE "/home/notroot/sec/PROMONITOR.pse"
   "CN=PROMONITOR, OU=REDPEAKS, O=REDPEAKS, C=CH"

Configure the SNC client user in SAP

SNC settings in ABAP connector

Troubleshooting

libsapcrypto.so: cannot open shared object file

ERROR in unix_dlopen(): dlopen("libsapcrypto.so") FAILED:
"libsapcrypto.so: cannot open shared object file: No such file or directory"
# more /etc/ld.so.conf.d/libsapcrypto-555.x86_64.conf
/root/SNC