You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Dain Sundstrom (JIRA)" <ji...@apache.org> on 2008/08/23 22:11:44 UTC
[jira] Commented: (OPENEJB-901) TomcatSecurityService should use
the context-specific Realm
[ https://issues.apache.org/jira/browse/OPENEJB-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625100#action_12625100 ]
Dain Sundstrom commented on OPENEJB-901:
----------------------------------------
The example is missing the org.test.CustomRealm class. I'll try to reproduce without it, but it would be helpful to have.
> TomcatSecurityService should use the context-specific Realm
> -----------------------------------------------------------
>
> Key: OPENEJB-901
> URL: https://issues.apache.org/jira/browse/OPENEJB-901
> Project: OpenEJB
> Issue Type: Bug
> Components: tomcat
> Affects Versions: 3.0
> Environment: Ubuntu Linux 8.04, i386
> Reporter: Luis Fernando Planella Gonzalez
> Attachments: jaas.conf, test.war
>
>
> TomcatSecurityService currently uses only the default container Realm to authenticate users, ignoring a context-defined Realm.
> So, an user is correctly authenticated on the web application (for example, through j_security_check), but is not correctly authenticated in EJBs.
> Attached, is a war file and a jaas configuration file, which should have the system property java.security.auth.login.config set to it.
> To test, first authenticate by visiting http://localhost:8080/test/protected.jsp. Any username / password is validated, and the "user" role is granted. Then browse to http://localhost:8080/test/test, and a permission denied exception is thrown, because the role "user" is not granted.
> Another test is comment the @RolesAllowed("user") in TestServiceBean.sayHello() method. In this case, the isCallerInRole("user") is alwais false.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.