<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div><font color="#44546A">Hello All,</font></div>
<div><font color="#44546A">&nbsp;</font></div>
<div><font color="#44546A">I am trying to configure Keycloak as openID connect provider and IBM Websphere Application Server as Relying Party.</font></div>
<div><font color="#44546A">During authentication, keycloak sends the JWT. But IBM Websphere Application Server could not verify the token.</font></div>
<div><font color="#44546A">&nbsp;</font></div>
<div><font color="#44546A"><b>Below Exception is thrown:</b></font></div>
<div>com.ibm.websphere.security.WebTrustAssociationFailedException: CWTAI2007E: The OpenID Connect replying party (RP) encountered a failure during the login. The exception is [Failed to validate id token, exception thrown during verify [key is invalid]]. Check
the logs for details that lead to this exception. </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.oidc.client.RelyingParty.handleSigninCallback(RelyingParty.java:428)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;&lt;skipping trace&gt;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)</div>
<div>Caused by: com.ibm.ws.security.oidc.client.RelyingPartyException: Failed to validate id token, exception thrown during verify [key is invalid]</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.oidc.client.SessionCache.updateEntryUsingStateId(SessionCache.java:352)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.oidc.client.RelyingParty.handleSigninCallback(RelyingParty.java:411)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... 28 more</div>
<div>Caused by: java.lang.IllegalStateException: key is invalid</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at net.oauth.jsontoken.crypto.RsaSHA256Verifier.&lt;init&gt;(RsaSHA256Verifier.java:45)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.openidconnect.token.JWT.getJsonTokenParser(JWT.java:1017)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.openidconnect.token.JWT.verify(JWT.java:881)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.openidconnect.token.IDToken.verify(IDToken.java:578)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.oidc.client.SessionData.setIdToken(SessionData.java:294)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.oidc.client.SessionData.update(SessionData.java:131)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.ibm.ws.security.oidc.client.SessionCache.updateEntryUsingStateId(SessionCache.java:343)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... 29 more</div>
<div><b>Caused by: java.security.InvalidKeyException: No installed provider supports this key: (null)</b></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.security.Signature$Delegate.chooseProvider(Signature.java:1139)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.security.Signature$Delegate.engineInitVerify(Signature.java:1172)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.security.Signature.initVerify(Signature.java:462)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at net.oauth.jsontoken.crypto.RsaSHA256Verifier.&lt;init&gt;(RsaSHA256Verifier.java:41)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... 35 more</div>
<div>. Make sure that the setup is correct and that the user credentials are valid.</div>
<div>[6/7/16 8:58:30:493 IST] 000002bb WebCollaborat A&nbsp;&nbsp; SECJ0056E: Authentication failed for reason CWTAI2007E: The OpenID Connect replying party (RP) encountered a failure during the login. The exception is [Failed to validate id token, exception thrown during
verify [key is invalid]]. Check the logs for details that lead to this exception.</div>
<div><font color="#44546A">-------------------------------------------------------------------------------------------------------------------------------------------</font></div>
<div><font color="#44546A">&nbsp;</font></div>
<div><font color="#44546A"><b>I have attached the Websphere log</b><b> during authentication</b><b>, Could someone help me </b><b>analyse</b><b> </b><b>the issue?</b></font></div>
<div><font color="#44546A"><b> </b></font></div>
<div><font color="#44546A"><b>Versions used:</b></font></div>
<div><font color="#44546A">Keycloak -1.9.4.Final</font></div>
<div><font color="#44546A">IBM WebSphere Application Server Network Deployment - Version 8.5.5.8</font></div>
<div>&nbsp;</div>
<div>Please let me know if any information needed.</div>
<div>&nbsp;</div>
<div><font color="#274E13"><b>Regards,</b><font color="black"> </font></font></div>
<div><font color="#073763"><b>Suseendhiran T</b></font></div>
<div><font color="#073763">&nbsp;</font></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>