Issue Details (XML | Word | Printable)

Key: OPENEJB-901
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dain Sundstrom
Reporter: Luis Fernando Planella Gonzalez
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenEJB

Fixed broken isCallerInRole when using Tomcat JAASRealm with the TomcatSecurityService

Created: 21/Aug/08 07:44 PM   Updated: 29/Oct/08 07:53 PM
Return to search
Component/s: tomcat
Affects Version/s: 3.0
Fix Version/s: 3.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works ejb-examples.war 2008-08-23 09:45 PM Dain Sundstrom 28 kB
File Licensed for inclusion in ASF works jaas.conf 2008-08-21 08:06 PM Luis Fernando Planella Gonzalez 0.1 kB
Java Archive File Licensed for inclusion in ASF works realm.jar 2008-08-23 09:45 PM Dain Sundstrom 1 kB
File Licensed for inclusion in ASF works test-updated.war 2008-09-03 01:35 PM Luis Fernando Planella Gonzalez 12 kB
File Licensed for inclusion in ASF works test.war 2008-08-25 12:44 PM Luis Fernando Planella Gonzalez 18 kB
File Licensed for inclusion in ASF works test.war 2008-08-21 08:06 PM Luis Fernando Planella Gonzalez 18 kB
Environment: Ubuntu Linux 8.04, i386

Resolution Date: 20/Oct/08 12:49 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.