webMethods API Gateway v10.15.0.15.494
We can login to API Gateway, we can get a token but when it comes to directly calling the API we get the error message below. Any help people can provide would be brilliant - thank you!
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Thanks again!
Hi Leuan,
are you using different ports for logging in to the gateway, for retrieving the token and invoking the the API directly?
If yes, please check the port configs then for the SSL certificates.
On the other side check with the caller of the API about their certificate settings.
Regards,
Holger
Dear,
To avoid the SSL validation on from caller side you can try disabling SSL validation for test environment only.
To resolve the CORS issue, you can use configure allowed origins in CORS policy for API under the Response Processing policies in API GW.
Allowed Origins = list of domains/origins allowed to invoke this API using browser (i.e. origins allowed in HTTP/HTTPS request)
Allow Header = if you wan to control headers then provide the list of headers allowed in request for pre-flight requests or actual requests. If you don’t want to control header then just put * this will allow all header.
Allow Methods = HTTP methods allowed in web request
It is important to understand that web server will return 200 OK response against CORS pre-flight request when the origin in request matches with origin specified in API level CORS policy and header in request matches with allow