[keycloak-user] Issue with Tomcat 8 adapter ?
harsh mahey
harshmahey at gmail.com
Sun Nov 1 23:12:23 EST 2015
Hi guys,
Has any one faced any issue with tomcat 8 adapters.
For some reason i am not get keycloak login screen on my web app,Here is my
scenario
1. Latest version of Keycloak runs on wildfly
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
3. When i login , i directly gets my webapp page and it does not redirects
me to keycloak login page.
4. My webapp is build using angularjs
keycloak.json
********************
{
"realm": "SnrAppsRealm",
"realm-public-key":
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAutb9hlKhbZvIm6RDPPFFpR1RcNAt/NpzCWemJOveG1Ve5eu2AwPKwmqvkhTaMWUW990BFPIkBRPv13Grt9AVTMTgU10IeK/PM9CGN05eFr6S3KMSSTskpszIN3opiRQ5r8/eCYjC4Bk6qFkbtrlp6ORvUkLS7nMLwVLh9JDo2Fx9nWd+l1oLq1YpYMYeLDcaOAW/vdjYSfyLueu2wESjY9oSEs8x43ZyIhNKGRmW3oDXYL8X5guiqalZD5gbhWv6v3WpeTqdi0sLv4GI2B3oSG76Z/x2On/Sc2r3szfM8kUllyV7K8uYoMgD7DFVOZX5g6Bi6xntzkJHwLMJtW4UPwIDAQAB",
"auth-server-url": "http://xxxxx.com:9322/auth",
"ssl-required": "none",
"resource": "snrapps-web",
"credentials": {
"secret": "dda19c87-efee-4c33-a1b3-8b64ad545s0f"
},
"use-resource-role-mappings": true
}
*****************************
web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<module-name>snrapps-web</module-name>
<security-constraint>
<web-resource-collection>
<web-resource-name>/snrapps-web</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>this is ignored currently</realm-name>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
<security-role>
<role-name>user</role-name>
</security-role>
</web-app>
***************
META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/snrapps-web">
<Valve className=
"org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve" />
</Context>
***********
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151101/8c65d636/attachment-0001.html
More information about the keycloak-user
mailing list