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

Enable SNC encrypted connections in sap_pyrfc #26

Open
1 task done
bmaercz opened this issue Feb 16, 2023 · 2 comments
Open
1 task done

Enable SNC encrypted connections in sap_pyrfc #26

bmaercz opened this issue Feb 16, 2023 · 2 comments

Comments

@bmaercz
Copy link

bmaercz commented Feb 16, 2023

Summary

I'd love to use this sap_pyrfc module to automate SAP tasks using Ansible. But our systems only allow RFC calls via SNC encrypted connections. It seems that community.sap_libs.sap_pyrfc is not supporting this.

When I try to specify SNC parameters (as documented in https://sap.github.io/PyRFC/pyrfc.html) in my ansible playbook like follows:

- name: test the pyrfc module
   community.sap_libs.sap_pyrfc:
     function: DELIVERY_GET_COMPONENT_RELEASE
     parameters:
       IV_COMPNAME: "SAP_BASIS"
     connection:
       ashost: my.sap.as.host
       sysid: SID
       sysnr: "01"
       client: "000"
       user: USERNAME
       passwd: PWD
       snc_qop: Privacy Protection
       snc_myname: SNCNAME
       snc_partnername: SNCPARTNERNAME
       lang: EN

I get an error message telling me that I'm using unsupported parameters:

"Unsupported parameters for (community.sap_libs.sap_pyrfc) module: snc_myname, snc_partnername, snc_qop found in connection. Supported parameters include: ashost, client, lang, passwd, sysid, sysnr, user"

Is it planned to add SNC support to sap_pyrfc module any time soon?

Kind regards
Benny

Issue Type

Feature Idea

Component Name

community.sap_libs.sap_pyrfc

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@rainerleber
Copy link
Collaborator

Hi @bmaercz thank you for opening the issue. At the moment the module doesn't support this. We will investigate this. Please be patient

@bsrdjan
Copy link

bsrdjan commented Jan 16, 2024

Hi, pyrfc maintainer here,

why not completely remove this connection parameters semantic check?

There are many possible parameters' combinations and SAP NW RFC SDK performs the check anyway, returning error message if invalid parameter is passed or when particular parameter missing.

No need to duplicate the logic here IMHO, only to check if connection parameters are passed as str:str dictionary. pyrfc and SAP NW RFC SDK will do the rest. It would enable all logon scenarios configured in ABAP system.

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

3 participants