-1

I'm trying to connect to s4 hana system using s4 sdk. While executing calls via .execute() method in cloud foundry environment, i see below error logs:

Caused by: com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to get authentication headers. Destination service returned error: Missing private and public key for subaccount ******-****-****-***-*******.

Note: I've already configured trust between subaccount and S4Hana system and created respective communication and business user. The associated authentication method used in the destination is oAuth2SamlBearerAssertion. Note: The call executes fine in both local and cloud foundry environment with basic authentication.

Can someone please suggest what is wrong here.

Rahul Pandey
  • 141
  • 1
  • 11
  • I suggest to create a backup copy of your oAuth2SamlBearerAssertion destination and create another one using basic authentication. Does that work? So we can find out if the problem affects finding the destination or the connection to S/4HANA. – Emdee Sep 10 '18 at 06:04
  • @Emdee yes, I've tried that. The basic authentication works fine and I'm able to get data from s4Hana system. – Rahul Pandey Sep 10 '18 at 06:10
  • You tried basic authentication from your local environment or from the Cloud? – Emdee Sep 10 '18 at 06:22
  • Both: Basic authentication in the cloud environment as well as local, both works fine. – Rahul Pandey Sep 10 '18 at 06:37
  • Pls share the trust configuration from your Cloud Foundry subaccount. Make sure that you omit any confidential information. – Emdee Sep 10 '18 at 08:00
  • I'm using default SAP ID Service as identity provider so I don't have my own local identity provider. What details/trust configurations you need in case of SAP ID service? – Rahul Pandey Sep 10 '18 at 08:13
  • You stated that you "configured trust between subaccount and S4Hana system". We're guessing that something went wrong there. Can you please share with us how you've done this and share your configuration? – Dennis H Sep 11 '18 at 07:15
  • @DennisH yes there was a problem in trust configuration, I corrected it now. – Rahul Pandey Sep 11 '18 at 09:07

2 Answers2

2

As correctly pointed out by @Dennis H there was a problem in trust configuration between my subaccount and S4 Hana system, the configuration wrong in my case :

-> The certificate I downloaded for trust was using this URL:
https://.authentication.eu10.hana.ondemand.com/saml/metadata

This is incorrect we need to get the certificate from download trust button in destination tab at subaccount level

->Provider name was incorrect in the communication system.

Rahul Pandey
  • 141
  • 1
  • 11
0

We are developing a side-by-side extension app and deploying it to CF. Our app is trying to connect to S4HANA cloud system using oAUTH2SAMLBEARERASSERTION. But facing issues while doing it. We are getting below error in logs. Please be noted, we are able to connect to S4HANA Cloud using basic auth.

com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to access the configuration of destination

Our destination parameters look as attached screenshotenter image description here

Thank you.

Srinath Ve
  • 13
  • 2
  • This does not provide an answer to the question. You can search for similar questions, or refer to the related and linked questions on the right-hand side of the page to find an answer. If you have a related but different question, ask a new question, and include a link to this one to help provide context. See: [Ask questions, get answers, no distractions](https://stackoverflow.com/tour) – DjSh Nov 07 '19 at 14:18