SAP Knowledge Base Article - Preview

3574634 - OAuth2 authentication in Cloud Integration fails with PKIX path building error

Symptom

When an integration flow in SAP Cloud Integration uses an OAuth2-based security material for outbound communication (for example, calling a Hybris/SAP Commerce Cloud OAuth token endpoint such as /authorizationserver/oauth/token), message processing fails with:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Or wrapped as:
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Exception occurred while fetching OAuth Token. Reason: (certificate_unknown) PKIX path building failed...

The error occurs regardless of which OAuth2 grant type is configured in the security material (Client Credentials, SAML Bearer Assertion, Authorization Code). The error appears even when the target endpoint itself is reachable and the TLS handshake to the target API server succeeds. In some cases the scenario worked previously and started failing suddenly, which typically indicates that the certificate on the token provider side was renewed or rotated.


Read more...

Environment

  • SAP Integration Suite 
  • SAP Business Technology Platform 
  • Cloud Integration

Product

Cloud Integration all versions ; SAP Integration Suite all versions

Keywords

OAuth2 Client Credentials, OAuth2 SAML Bearer Assertion, OAuth2 Authorization Code, PKIX path building failed, unable to find valid certification path, SunCertPathBuilderException, Token Service URL, outbound TLS, security material, keystore, root certificate, Cloud Integration, SAP Integration Suite, cpi,PKIX path building failed, SunCertPathBuilderException, OAuth2 token, Cloud Integration, Security Material, Token Service URL, Hybris authorizationserver, SAP Commerce Cloud, Keystore, Root CA certificate, Certificate renewal, Connectivity Test, LOD-HCI-PI-CON-SOAP, unable to find valid certification path , KBA , LOD-HCI-PI-CON-SOAP , SOAP Adapter , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.