<div dir="ltr">Hi guys,<div>Has any one faced any issue with tomcat 8 adapters.</div><div>For some reason i am not get keycloak login screen on my web app,Here is my scenario</div><div><br></div><div>1. Latest version of Keycloak runs on wildfly</div><div>2. A war runs on tomcat.I put all the jar files under tomcat/lib dir.Below is the keycloak.json and my web.xml file which goes under my WEB-INF</div><div>3. When i login , i directly gets my webapp page and it does not redirects me to keycloak login page.</div><div>4. My webapp is build using angularjs</div><div><br></div><div>keycloak.json</div><div>********************</div><div>
<p class="">{</p>
<p class=""> "realm": "SnrAppsRealm",</p>
<p class=""> "realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAutb9hlKhbZvIm6RDPPFFpR1RcNAt/NpzCWemJOveG1Ve5eu2AwPKwmqvkhTaMWUW990BFPIkBRPv13Grt9AVTMTgU10IeK/PM9CGN05eFr6S3KMSSTskpszIN3opiRQ5r8/eCYjC4Bk6qFkbtrlp6ORvUkLS7nMLwVLh9JDo2Fx9nWd+l1oLq1YpYMYeLDcaOAW/vdjYSfyLueu2wESjY9oSEs8x43ZyIhNKGRmW3oDXYL8X5guiqalZD5gbhWv6v3WpeTqdi0sLv4GI2B3oSG76Z/x2On/Sc2r3szfM8kUllyV7K8uYoMgD7DFVOZX5g6Bi6xntzkJHwLMJtW4UPwIDAQAB",</p>
<p class=""> "<span class="">auth</span>-server-<span class="">url</span>": "<a href="http://xxxxx.com:9322/auth">http://xxxxx.com:9322/auth</a>",</p>
<p class=""> "<span class="">ssl</span>-required": "none",</p>
<p class=""> "resource": "<span class="">snrapps</span>-web",</p>
<p class=""> "credentials": {</p>
<p class=""> "secret": "dda19c87-<span class="">efee</span>-4c33-a1b3-8b64ad545s0f"</p>
<p class=""> },</p>
<p class=""> "use-resource-role-mappings": true</p>
<p class="">}</p><p class="">*****************************<br></p><p class="">web.xml<br></p><p class=""><span class=""><</span><span class="">web-app</span><span class=""> </span><span class="">xmlns</span><span class="">=</span>"<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a>"<span class=""> </span><span class="">xmlns:xsi</span><span class="">=</span>"<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"<span class=""> </span></p><p class=""><span class="">xsi:schemaLocation</span><span class="">=</span>"<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a> <a href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</a>"<span class=""> </span><span class="">version</span><span class="">=</span>"3.0"<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>module-name<span class="">></span><span class="">snrapps</span><span class="">-web</span><span class=""></</span>module-name<span class="">></span></p><p class=""><br></p><p class=""><br></p><p class=""><span class=""> </span><span class=""><</span>security-constraint<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>web-resource-collection<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>web-resource-name<span class="">></span><span class="">/</span><span class="">snrapps</span><span class="">-web</span><span class=""></</span>web-resource-name<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>url-pattern<span class="">></span><span class="">/*</span><span class=""></</span>url-pattern<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>web-resource-collection<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>auth-constraint<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>role-name<span class="">></span><span class="">user</span><span class=""></</span>role-name<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>auth-constraint<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>security-constraint<span class="">></span></p><p class=""><br></p><p class=""><span class=""> </span><span class=""><</span>security-constraint<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>web-resource-collection<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span><span class="">url-pattern</span><span class="">></span><span class="">/*</span><span class=""></</span>url-pattern<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>web-resource-collection<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>user-data-constraint<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>transport-guarantee<span class="">></span><span class="">CONFIDENTIAL</span><span class=""></</span>transport-guarantee<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>user-data-constraint<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>security-constraint<span class="">></span></p><p class=""> <login-<span class="">config</span>></p><p class=""> <auth-method>BASIC</auth-method></p><p class=""> <realm-name>this is ignored currently</realm-name></p><p class=""> </login-<span class="">config</span>></p><p class=""><span class=""> </span><span class=""><</span>security-role<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>role-name<span class="">></span><span class="">admin</span><span class=""></</span>role-name<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>security-role<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>security-role<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span>role-name<span class="">></span><span class="">user</span><span class=""></</span>role-name<span class="">></span></p><p class=""><span class=""> </span><span class=""></</span>security-role<span class="">></span></p><p class="">
</p><p class=""><span class=""></</span>web-app<span class="">></span></p><p class=""><br></p><p class="">***************</p><p class="">META-INF/context.xml</p><p class=""><br></p><p class=""><span class=""><?</span><span class="">xml</span><span class=""> </span>version<span class="">=</span><span class="">"1.0"</span><span class=""> </span>encoding<span class="">=</span><span class="">"UTF-8"</span><span class="">?></span></p><p class=""><span class=""> </span><span class=""><</span><span class="">Context</span><span class=""> </span><span class="">path</span><span class="">=</span>"/snrapps-web"<span class="">></span></p><p class=""><span class=""> </span><span class=""><</span><span class="">Valve</span><span class=""> </span><span class="">className</span><span class="">=</span>"org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve"<span class=""> </span><span class="">/></span></p><p class="">
</p><p class=""><span class=""> </span><span class=""></</span>Context<span class="">></span></p><p class=""><span class=""><br></span></p><p class=""><span class="">***********</span></p><p class=""><span class=""><br></span></p><p class=""><br></p></div></div>