<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I am having a few problems with Keycloak.&nbsp; Let me first start with the environment information:<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Keycloak version: 1.9.0<o:p></o:p></p><p class=MsoNormal>Keycloak wildfly version: 10.0.0<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Application wildfly version: 8.0.0<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><b>Problem 1: EJB error - javax.ejb.EJBAccessException: JBAS013323: Invalid User<o:p></o:p></b></p><p class=MsoNormal>I have followed the documentation by adding the keycloak adapter to the application wildfly 8.0 and by server.xml has the following:<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;extensions&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;extension module=&quot;org.keycloak.keycloak-adapter-subsystem&quot;/&gt;<br>&lt;/extensions&gt;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;profile&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;subsystem xmlns=&quot;urn:jboss:domain:security:1.2&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;security-domain name=&quot;keycloak&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;authentication&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;login-module code=&quot;org.keycloak.adapters.jboss.KeycloakLoginModule&quot; flag=&quot;required&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/authentication&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/security-domain&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/security-domains&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/subsystem&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;subsystem xmlns=&quot;urn:jboss:domain:keycloak:1.1&quot;/&gt;<br>&lt;/profile&gt;<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>MyEJB:<br><span style='font-size:10.0pt;font-family:Consolas;color:#646464'>@Stateless</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:#646464'>@Local</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>(MyInt.</span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>class</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:#646464'>@SecurityDomain</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>(</span><span style='font-size:10.0pt;font-family:Consolas;color:#2A00FF'>&quot;keycloak&quot;</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>)<br></span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>public</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>class</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> MyBean </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>implements</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> MyInt <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:#646464'>&nbsp;&nbsp;&nbsp; @PermitAll</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp; </span><span style='font-size:10.0pt;font-family:Consolas;color:#646464'>@TransactionAttribute</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>(TransactionAttributeType.</span><b><i><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>REQUIRES_NEW</span></i></b><span style='font-size:10.0pt;font-family:Consolas;color:black'>)</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp; </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>public</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> boolean myMethod(...) </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>throws</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> Exception {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>At the moment I am not using jboss-ej3.xml as I reference the security domain in my EJB class.&nbsp; I added it and it did not help out<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>Stacktrace:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'>ERROR [org.jboss.as.ejb3.invocation] (default task-13) JBAS014134: EJB Invocation failed on component MyBean for method public abstract boolean com.at.ejb.MyInt.myMethod(&#8230;) throws java.lang.Exception: javax.ejb.EJBAccessException: JBAS013323: Invalid User<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:66) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:46) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:92) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Is there something I am missing from the documentation?&nbsp; Any thoughts how to resolve this issue?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b>Problem 2: Unable to log out a user from keycloak administration console:<o:p></o:p></b></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>After I click &#8220;Logout&#8221; on the administration console in Keycloak, I see the following error on the keycloak server:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>ERROR [io.undertow.request] (default task-26) UT005023: Exception handling request to /auth/admin/realms/affordabletours/sessions/f1e69f90-03fc-453d-a495-225bb0c429ab: org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: org.apache.http.impl.client.HttpClientBuilder.setConnectionTimeToLive(JLjava/util/concurrent/TimeUnit;)Lorg/apache/http/impl/client/HttpClientBuilder;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'><br>Best regards,<br><br></span><a href="http://www.affordabletours.com/" title="blocked::http://www.affordabletours.com/"><b><span style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:blue'>AffordableTours.com</span></b></a><br><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Firdos Ali<br>Senior Project Manager<br>11150 Cash Road</span><br><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Stafford, TX 77477</span><br><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Toll Free (800) 935-2620 X181<br>Direct (281) 269-2681<br>Fax (281) 269-2691<br>E-mail: <a href="mailto:ali@affordabletours.com" title="blocked::mailto:ali@affordabletours.com"><span style='color:blue'>ali@affordabletours.com</span></a><br>My Working Hours: Mon - Fri: 09:00AM - 05:00PM CST<o:p></o:p></span></p><p class=MsoNormal align=center style='text-align:center'><i><span style='font-size:8.0pt;font-family:"Arial",sans-serif;color:black'>NOTICE: This e-mail message, including any attachments, is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the recipient, please contact the sender by reply e-mail and destroy all copies of the original message</span></i><o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>