wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 729 forks source link

wso2 federation : unable to find valid certification path to requested target #16137

Closed Simkiw closed 1 year ago

Simkiw commented 1 year ago

Describe the issue: When I try to log in with an external identity provider with a valid tested user, I get an exception from my client .net app
client app says login_required', error_description: 'Authentication required', error_uri: 'error_uri is null'

and wso2 carbon server says

ERROR {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler} - Authentication failed exception! javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

How to reproduce:

Expected behavior: Once i log in via the external identity provider, I expect to be redirected to my service provider page with an ID and access token from Wso2.

Environment information (Please complete the following information; remove any unnecessary fields) :


image

Simkiw commented 1 year ago

The problem is the certificate.
Basically, wso2 does not recognize the external idp certificate.
I had to import its certificate to wso2 client trustore.
Also, the certificate must be a .pfx