You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Niranjan Rao <nh...@gmail.com> on 2012/01/02 22:13:56 UTC

Infinite loop for user authentication when running on Apache2 as frontend server.

Happy new year folks,

I have tomcat server running application war file serving only ajp 
protocol. Apache2 is configured to serve my application using ajp. This 
works - sometimes :( So far I have not able to figure out what breaks it 
or what makes it work and looking for help. The description of the 
problem is little complicated

Authentication on tomcat directly works expected. Authentication using 
apache2 as frontend server does work sometimes.

Whenever user tries to access the page that needs to be authenticated, 
it seems like wicket does not do redirect to login page, but serves the 
login page internally. Browser url does not change to login page. So if 
I try to access a page say mypage, wicket sends redirect /mypage - but 
next redirect actually serves the login page. I tried debugging tomcat 
instance and it seems like wicket does not get session cookie and 
creates a new session. So what firebug shows is number of redirects to 
the same url until firefox gets bored and shows up the error message. 
Things get especially interesting if remember me flag is checked. You 
are logged in to half of the page and other half (like ajax service 
calls) return the response that you need to login.

I have spent many hours trying to narrow the problem. On fresh browser 
with history cleaned up - specifically cookies, it all works very 
nicely. So apache2 does pass the cookies and wicket does see it. On the 
other hand if had logged in once and session expires (my theory, no 
proof), it does get into infinite redirect loop.

Any help/pointers are greatly appreciated.

Niranjan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org