Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: security-0.3.1, security-0.4.0
-
Fix Version/s: security-0.4.1
-
Component/s: security
-
Labels:None
-
Number of attachments :
Description
There is a slightly difference between the way the AuthorizationFilter and AuthenticationFilter redirect to the login page, and the way the ShiroExceptionHandler redirects to the login page.
This means that these two options do not behave exactly in the same way.
1) @RequiresRole("admin") public class Index {
2) configuration.add(factory.createChain("/").add(factory.roles(),"admin").build());
The option number 2 uses WebUtils.issueRedirect and returns a 301 redirect_ pointing to the login page to the client.
The @RequiresRole("admin") annotation uses the ShiroExceptionHandler and does an "internal" tapestry redirect to the login page. That is it will not return a 301 redirect to the login page and it won't change the original "window.location". This creates some difficulties when working with SSL and it's the root cause of the issue explained in TYNAMO-103.
Issue Links
- relates to
-
TYNAMO-103
@Security, tapestry.secure-enabled, MetaDataConstants.SECURE_PAGE not honored by Tapestry security
-
Changed the ShiroExceptionHandler to use WebUtils.issueRedirect