question

joparida avatar image
joparida asked ·

Login with OAuth 2.0 Error with Spring Boot Sample App

Error Details:

Login with OAuth 2.0

[invalid_token_response] An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: I/O error on POST request for "https://api.fusionfabric.cloud/login/v1/sandbox/oidc/token": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

AuthenticationRegistration
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Dawid.Rampalski avatar image
Dawid.Rampalski answered ·

Hello,

did You follow the guide mentioned in README.md file in https://github.com/FusionFabric/ffdc-sample-springboot ?

Could You please check if Your

  • <%authorization-endpoint%>, <%token-endpoint%>, and <%jwks_uri%> URLs, from the Discovery service of FusionFabric.cloud Developer Portal.

are consistent with the information available in our discovery service available at:

https://developer.fusionfabric.cloud/documentation?workspace=FusionCreator%20Developer%20Portal&board=Home&uri=discovery-service.html


3 comments Share
10 |600 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thank you @Dawid.Rampalski for writing.


Verified the details in config file(application.yml) and it's matching with the URLs provided by the Discovery service.

Guess the issue with getting the access token for the API call. The SSL/Proxy setting might be blocking to get the token code. Unable to set the same in spring boot application.


Note: Tried in POSTMAN, with disabling the proxy and ssl and able to get the access token. Also able to test the API with expected response.

0 Likes 0 · ·

Have You tried with postman and enabled SSL?

It seems that the proxy has issues with certificate communication to the OAuth endpoint.

0 Likes 0 · ·
joparida avatar image joparida Dawid.Rampalski ♦♦ ·

@Dawid.Rampalski

With SSL enabled in postman, got the error "invalid token response".

You said it right, the issue here is with certificate communication to OAuth client.

not sure how to fix it.

0 Likes 0 · ·