We had the same problem.
In few words your application doesn't trust the Keycloak if you have
Keycloak with SSL behind the LoadBalancer. You need to configure
"truststore.jks" for your application. This truststore need to contains
Keycloak's certificate.
BR, Karol
On 31.01.2019 12:23, Subodh Joshi wrote:
Hi
I have configured keycloak4.5 with Wildfly(With LoadBalancer) and able get
the token , but when I am using that token for to get response from rest
service getting below error :
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*HTTP/1.1 401 Unauthorized*
*Cache-Control: no-cache, no-store, must-revalidate, private*
*X-Powered-By: Undertow/1*
*X-XSS-Protection: 1; mode=block*
*Server: WildFly/11*
*X-Frame-Options: SAMEORIGIN*
*Date: Wed, 30 Jan 2019 07:42:45 GMT*
*Connection: keep-alive*
*WWW-Authenticate: Bearer realm="demorealm", error="invalid_token",
error_description="Didn't find publicKey for specified kid"*
*X-Content-Type-Options: nosniff*
*Content-Type: text/html;charset=UTF-8*
*Content-Length: 71*
*<html><head><title>Error</title></head><body>Unauthorized</body></html>*
*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*
*Can anyone help me here please what configuration I am missing , I am
struggling for so many days to solve this problem but couldn't get any
solution .*
[
https://www.adbglobal.com/wp-content/uploads/adb.png]
adbglobal.com<https://www.adbglobal.com>
This message (including any attachments) may contain confidential, proprietary, privileged
and/or private information. The information is intended for the use of the individual or
entity designated above. If you are not the intended recipient of this message, please
notify the sender immediately, and delete the message and any attachments. Any disclosure,
reproduction, distribution or other use of this message or any attachments by an
individual or entity other than the intended recipient is STRICTLY PROHIBITED.
Please note that ADB protects your privacy. Any personal information we collect from you
is used in accordance with our Privacy
Policy<https://www.adbglobal.com/privacy-policy/> and in compliance with applicable
European data protection law (Regulation (EU) 2016/679, General Data Protection
Regulation) and other statutory provisions.