Shiro using default Tomcat Web Session Mgmt.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Shiro using default Tomcat Web Session Mgmt.

jim.piersol@gmail.com
Does anyone use Tomcat 8 with Tomcats Session Mgmt?  I have been unable to make it work.  Everything works fine with Jetty, but when running under Tomcat, even though correct JSESSIONIDs are passed, Shiro doesn't recognize session and assumes I need to login again.

If I use Shiro Native Web Session Mgmt, it does work fine.

My issue is that I need to use Apache mod_proxy infront of a group of Tomcat servers.  Apache load balancing doesn't work with Shiros SessionID generation (doesn't include the jvmRoute info like default Tomcat does), thus Apache can't honor stickysessions.

I would love to switch back to Tomcat session mgmt, but I can't get anywhere with it while using Shiro.  Can anyone that uses Tomcat assist?

Here is link to a previous thread I was using when doing initial Shiro integration:
http://shiro-user.582556.n2.nabble.com/Shiro-rediecting-back-to-Login-after-successful-Login-td7581130.html
Reply | Threaded
Open this post in threaded view
|

Re: Shiro using default Tomcat Web Session Mgmt.

lprimak
Are you using distributable directive in your web.xml by any chance?

> On Nov 14, 2016, at 10:25 AM, "[hidden email]" <[hidden email]> wrote:
>
> Does anyone use Tomcat 8 with Tomcats Session Mgmt?  I have been unable to
> make it work.  Everything works fine with Jetty, but when running under
> Tomcat, even though correct JSESSIONIDs are passed, Shiro doesn't recognize
> session and assumes I need to login again.
>
> If I use Shiro Native Web Session Mgmt, it does work fine.
>
> My issue is that I need to use Apache mod_proxy infront of a group of Tomcat
> servers.  Apache load balancing doesn't work with Shiros SessionID
> generation (doesn't include the jvmRoute info like default Tomcat does),
> thus Apache can't honor stickysessions.
>
> I would love to switch back to Tomcat session mgmt, but I can't get anywhere
> with it while using Shiro.  Can anyone that uses Tomcat assist?
>
> Here is link to a previous thread I was using when doing initial Shiro
> integration:
> http://shiro-user.582556.n2.nabble.com/Shiro-rediecting-back-to-Login-after-successful-Login-td7581130.html
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Shiro using default Tomcat Web Session Mgmt.

jim.piersol@gmail.com
No, web.xml is very straight forward.  Not trying to do anything out of the ordinary.

Reply | Threaded
Open this post in threaded view
|

Re: Shiro using default Tomcat Web Session Mgmt.

lprimak
Well you should. Servlet spec says so. This is probably why it doesn't work.

> On Nov 14, 2016, at 10:37 AM, "[hidden email]" <[hidden email]> wrote:
>
> No, web.xml is very straight forward.  Not trying to do anything out of the
> ordinary.
>
>
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380p7581382.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Shiro using default Tomcat Web Session Mgmt.

jim.piersol@gmail.com
Yes...   I am not to the point of Clustering though.  With nothing more then 1 Tomcat instance just running basic webapp using Shiro, Shiro doesn't work.  If I use exact same everything with a Jetty instance, then it works.  Im just trying to figure out if Tomcat works for anyone else.
Reply | Threaded
Open this post in threaded view
|

Re: Shiro using default Tomcat Web Session Mgmt.

I PVP
One of the applications I  work with is running on Tomcat and relies on Shiro for all Authentication and Authorization.
Tomcat 9M13 + Shiro 1.3.2 +  Cassandra 3.9 (stores session data, authentication data and authorization data)

IPVP 

On November 14, 2016 at 3:14:37 PM, [hidden email] ([hidden email]) wrote:

Yes... I am not to the point of Clustering though. With nothing more then
1 Tomcat instance just running basic webapp using Shiro, Shiro doesn't work.
If I use exact same everything with a Jetty instance, then it works. Im
just trying to figure out if Tomcat works for anyone else.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-using-default-Tomcat-Web-Session-Mgmt-tp7581380p7581384.html
Sent from the Shiro User mailing list archive at Nabble.com.