S/4 HANA How to Get rid of Basic Auth – SOAMANAGER Local Configuration on Client Certificate
Share

[[{“value”:”

The local configuration in SOAMANAGER is also called automatic configuration. Rather than configured manully, the logical port is configured by the task automatically in the background.

However, in this mode, the authentication doesn’t support OAuth2. To get rid of basic auth, an option is to use client certificate.

Configuration Steps

let’s take sales order notification outbound as an example.

This is the office help document:

https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/19d48293097f4a2589433856b034dfa5/ed66f965148548a9bb76c24be640d7fc.html?locale=en-US

1. Generate certificate files and upload it into S4 HANA

Please refer to the configuration steps described here 

2. Activate the AIF

TCODE: /AIF/SETUP,  switch off ‘test mode’

stephen_xue_0-1775624482772.png

3. Unpack AIF Content

TCODE: /AIF/CONTENT_EXTRACT

stephen_xue_1-1775626249331.pngstephen_xue_2-1775626281554.png

4. Ensure that the Web service Point-to-Point is active in Customizing

stephen_xue_3-1775626405974.pngstephen_xue_4-1775627328151.png

5. Download WSDL file from SAP Accelerator Hub

https://help.sap.com/docs/link-disclaimer?site=https%3A%2F%2Fapi.sap.com%2Fapi%2FOP_CO_SDSLS_ESR_SALES_ORDER_NOTIF%2Foverview

stephen_xue_5-1775627642098.png

6. Modify WSDL

Add namespace Prefix definitions

xmlns:wsp=”http://schemas.xmlsoap.org/ws/2004/09/policy”
xmlns:sp=”http://docs.oasis-open.org/wss/oasis-wss-wssecurity-policy-1.2″

Add a new policy before the wsdl:type section

<wsp:Policy wsu:Id=”ClientCertificateBindingPolicy”>
<wsp:ExactlyOne>
<wsp:All>
<!– Mandate mutual authentication using X.509 Certificate –>
<sp:TransportBinding xmlns:sp=”http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702″>
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken>
<wsp:Policy>
<wsp:ExactlyOne>
<!– Require Client Certificate –>
<sp:RequireClientCertificate/>
</wsp:ExactlyOne>
</wsp:Policy>
</sp:HttpsToken>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<wsp:ExactlyOne>
<sp:Basic256Sha256/>
</wsp:ExactlyOne>
</wsp:Policy>
</sp:AlgorithmSuite>
</wsp:Policy>
</sp:TransportBinding>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>

add the following policy reference inside wsdl:binding section

<wsp:Policy>
<wsp:PolicyReference URI=”#ClientCertificateBindingPolicy”/>
</wsp:Policy>

Update target endpoint

For example, if this is the service endpoint to be consumed:

https://api.example.com:50001/v1/users

 find out below string in the WSDL and replace it

https://host:port/

This is how the WSDL looks like after the modification

stephen_xue_6-1775631289291.png

stephen_xue_34-1775636893354.png

stephen_xue_8-1775631506483.png

7. Create Profile

choose Technical Administration —> Profile

stephen_xue_11-1775633117415.png

create a name, say Client_Cert

stephen_xue_12-1775633218895.png

select SSL, then choose client certification

stephen_xue_13-1775633273244.png

stephen_xue_14-1775633366237.png

activate the profile

8. Create Provider System

choose Technical Administration  -> Provider Systems.

stephen_xue_9-1775632858810.png

choose ‘create special’ , then ‘create Third Party System’

stephen_xue_10-1775632914839.png

input a system name and select the profile defined just now

stephen_xue_15-1775633441685.png

input the username password for the SAP S4HANA system

stephen_xue_16-1775633539499.png

DO NOT activate the system. Just save it. 

Open the system in change mode

go to tab WSDL Assignment. choose to upload the WSDL modified.

stephen_xue_17-1775633740159.png

After uploading the WSDL,  you can save and activate the provider system.

stephen_xue_18-1775633865479.png

Check connection, you should get this view

stephen_xue_19-1775633915267.png

9. Maintain ‘Logon Data’

stephen_xue_20-1775634010393.png

click create button

stephen_xue_21-1775634046378.png

fill in a name which does make sense for future reading

stephen_xue_22-1775634094882.png

choose User/Password or X.509, select the PSE maintained with .pfx file

stephen_xue_24-1775634210037.png

activate it.

10. Local Configuration

go to Service Administration  –> Local Integration Scenario Configuration

stephen_xue_25-1775634326744.png

click save button

stephen_xue_26-1775634358490.png

Fill up a name which does make sense

stephen_xue_27-1775634454557.png

Under Service Definitions, add the inbound service SalesOrderBulkRequest_In and assign the profile you created earlier.

stephen_xue_29-1775634569069.png

Next step, As the service group, choose  SDSLS_A2A_SO_NOTIF

With this service group, you add Sales Order (A2A) and Sales Order – Send Processing Notification (A2A).

For the provider IBC reference, choose the provider system that you created earlier.

stephen_xue_30-1775634695403.png

select the logon data maintain just now in the next step

stephen_xue_31-1775634784654.png

confirm and activate the configuration

11. Process Tasks

choose Service Administration ->  Pending Tasks

stephen_xue_32-1775634904870.png

click process task List

stephen_xue_33-1775634953470.png

if everything has configured correctly , you should get a view similar to this:

stephen_xue_35-1775636979486.png

 

12. Check the Logical Port generated

goto ‘Web Service Configuration’, search for ‘SDSLS_A2A_SO_NOTIF’

stephen_xue_36-1775637061876.png

there should be logical port generated with a numberic id

stephen_xue_37-1775637175370.png

in the security tab, it should be similar to this view

stephen_xue_38-1775637235560.png

in the transport setting tab, you should see the replacing URL modified to WSDL filled in the URL field

stephen_xue_39-1775637281374.png

Since the logical port is via local configuration or automatically configured, none of the field is editable. This is a big contrast to the manual configuration. 

Conclusion

1. By using OpenSSL, you should be able to generate the .pfx file which uploaded into SAP S4

2. By modifing WSDL, you should be able to generate the client certificate authentication configured in the logical port.

Reference

https://developers.sap.com/tutorials/ws-local-configuration..html

https://community.sap.com/t5/enterprise-resource-planning-blog-posts-by-members/service-group-configuration-in-soamanager-using-ssl-certificates/ba-p/13572482

“}]] 

  Read More Technology Blog Posts by Members articles 

#abap

By ali

Leave a Reply