Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNC authentication #87

Closed
ku7mich opened this issue Nov 20, 2018 · 2 comments
Closed

SNC authentication #87

ku7mich opened this issue Nov 20, 2018 · 2 comments

Comments

@ku7mich
Copy link

ku7mich commented Nov 20, 2018

I am trying to connect with following code:

from pyrfc import Connection

def get_connection(connmeta):
    """Get connection"""
    print ('Connecting ...', connmeta['ashost'])
    return Connection(**connmeta)

SB1_300 = {
    'snc_partnername': 'p:CN=TEST_01@KKK.KZ',
#    'snc_lib': 'C:\Program Files\SAP\FrontEnd\SecureLogin\lib\sapcrypto.dll',

    'name': 'TEST_01@KKK.KZ',
    'client': '300',
    'ashost': 'happ01sb1',
    'sysnr': '10',
#    'trace': '3'
}

conn = get_connection(SB1_300)

And get the errror:

**** Trace file opened at 2018-11-20, 17:13:43 Pakistan Standard Time
NW RFC Library: SDK variant, Release 750 Patch Level 2, Compiled on Aug 31 2018 22:25:28
 CPIC library: 753.2018.08.08 version 3, NI library: 40, Kernel Release: 753 Patch Level 225
 Current working directory: I:\, Program: python
 Hardware: PC with Windows NT 4x AMD64 Level 6 (Mod 94 Step 3), Operating_system: Windows NT 10.0

Error during connect: 
LOCATION    CPIC (TCP/IP) with Unicode
ERROR       GSS-API(maj): Miscellaneous failure
            GSS-API(min): A2200210:Peer certificate verification failed
            target="p:CN=TEST_01@KKK.KZ"
TIME        Tue Nov 20 17:13:43 2018
RELEASE     753
COMPONENT   SNC (Secure Network Communication)
VERSION     6
RC          -4
MODULE      D:/depot/bas/753_REL/src/krn/snc/sncxxall.c
LINE        3604
DETAIL      SncPEstablishContext
SYSTEM CALL gss_init_sec_context
COUNTER     4

But connection by SAP GUI is working fine.

@bsrdjan
Copy link
Member

bsrdjan commented Nov 20, 2018

To be able to communicate using SNC, the ABAP system must be able to
identify Python "system" and vice versa, using public certificates, exchanged and stored in Personal Secure Environment. Based on error message it looks like this configuration is missing (is independent from SAP GUI) or needs to be fixed.

Please find some more info, hopefully helpful to verify and fix the configuration:

@bsrdjan
Copy link
Member

bsrdjan commented Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants