I spent 10 mins in vain to aptly Title this post. but I still dont think I did justice.
While working with Acegi, I discovered a problem in a srange use case.
this post assumes intermediate-advanced level knowledge of Acegi
Acegi has a SecurityContextHolderAwareRequestFilter that filters requests accessing secure pages when SecurityContextHolder doesnot have a securityToken yet. So if user accesses /root/secure/resource , and he is not yet logged in, the request is redirected to /login (defined in AuthenticationProcessingFilterEntryPoint)
now, The request uri along with params if any are wrapped into SavedRequestWrapper, so it can be used to redirected to once the login is successful.
The SavedRequestWrapper implments HttpServletRequest so a getParam on this will return the params from /login request first and then /root/secure/resource after the redirect.
This is simple so far. But when the /root/secure/resource has a jsp:include page="/root/secure/resource2" things get complicated if both resources have some param keys. say:
/root/secure/resource?action1=method1 and included jsp is /root/secure/resource2?action2=metod2
and /root/secure/resource?action=method1 is accessed with out login
So the filter saves this request and creates a redirects it to /login once you login, The jsp:include kicks in, and adds the method2 to the action param so request will now have action2=method2&action1=method1. However, The saved request is trying to redirect all successfully logged in requests with a param map action=method1, so we lost method have a null value for action2.
I raised a bug ( and someone already fixed it )in Spring JIRA. How?
By always letting the new request supercede the old one.
Thursday, June 05, 2008
Acegi Security - fails to process login with a landing page having dynamic jsp:include
by
Sarath Chandra Pandurangi
at 22:56
|
0 Comment(s) |
Share
0 Comment(s) |
Share
Labels:
code,
continued,
developer,
home,
technology
Subscribe to:
Post Comments (Atom)
Subscribe
Blog Archive
-
►
2010
(61)
-
►
September
(11)
- v6.1 : SarathOnline live on java, now with Dynamic...
- Changing Times: American Brain Drain. To INDIA.
- Starred in Priority Inbox.
- When Facebook goes down..
- Firefox 4.0b6 context menu, likely has a bug.
- Happy Vinayaka Chavithi
- Firefox Longest context menu
- The Meaning of Life by Santé et beauté pour tous!!...
- MySQL > java.sql.SQLException: Error writing file ...
- Chrome Side tabs or Firefox Panorama?
- java turorials: Learn everything Java basic to ent...
-
►
September
(11)
-
▼
2008
(119)
-
▼
June
(16)
- What is Consumer JRE, Java Kernel
- Ganymede is here
- Dr Dobbs - July 2008
- Cisco AnyConnect Client on Ubuntu fails on server ...
- GIT Tutorial (s) - Move to Git today!
- ManagedConnection has no connection handle - ORA-0...
- CVS log Examples - How to get a change log
- Static Variables: The wild goose chase ends here.
- Static Variables: Grave Danger
- Three Words for Today
- Ubuntu on!! But no Sound!
- Acegi Security - fails to process login with a lan...
- SarathOnline Version History
- Data Majestic. Scalability thirsty Apps.
- Support FireFox. Pledge your Download
- Todays Dilbert
-
▼
June
(16)
Labels
- advanced (8)
- android (7)
- appengine (3)
- bugs (15)
- code (38)
- continued (25)
- css (6)
- design (11)
- developer (105)
- dilbert (4)
- Dobbs Journal (3)
- eclipse (12)
- enterprise (2)
- FeelGood (39)
- finance (2)
- firefox (6)
- flash (5)
- fun (29)
- git (1)
- Google (42)
- Green (13)
- gwt (2)
- home (140)
- iBatis (2)
- image (18)
- india (27)
- iphone (3)
- java (25)
- javascript (16)
- jee (41)
- linux (26)
- maven (1)
- memcache (1)
- mongodb (1)
- movie (1)
- mvn (1)
- mysql (2)
- nontech (65)
- OpenSource (16)
- osgi (7)
- Politics (5)
- python (2)
- scalability (13)
- scrum (2)
- security (7)
- soupdates (14)
- sports (1)
- spring (11)
- technology (98)
- Telugu (4)
- thanks (2)
- Threads (2)
- tips (88)
- Tools I Use (56)
- travel (7)
- tutorials (24)
- ubuntu (15)
- ux (4)
- vegetarian (1)
- video (27)
- voip (1)
- webtech (29)
- webtools (3)
- weekend (62)
- wishes (3)
© SarathOnline.com 2000-'11


0 comments:
Post a Comment