Issue Details (XML | Word | Printable)

Key: GERONIMO-661
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Jencks
Reporter: Ivan Dubrov
Votes: 0
Watchers: 0
Operations

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

"Unchecked" permissions for all EJB methods ("*") do not work

Created: 03/Jun/05 07:08 PM   Updated: 07/Aug/06 03:05 PM
Return to search
Component/s: specs
Affects Version/s: None
Fix Version/s: 1.0-M4

Time Tracking:
Not Specified

Environment: Windows XP

Resolution Date: 10/Jul/05 12:22 PM


 Description  « Hide
EJBMethodPermissions.MethodSpec have incorrect serialization method. MethodSpec with parameters methodName=null, methodInterface=null, methodParam=null (that should match any method) deserializes with params methodName=null, methodInterface=null, methodParam="" (that matches any no-arg methos)!

As a result, EJB beans with all methods <unchecked/> do not work - AccessControlException is thrown (since methodParam="" means no-arg methods, whille methodParam=null means any methods).

Here is the simple patch:

Index: EJBMethodPermission.java
===================================================================
— EJBMethodPermission.java (revision 179589)
+++ EJBMethodPermission.java (working copy)
@@ -250,7 +250,7 @@
if (methodParams == null) {
if (methodInterface == null) {
if (methodName == null) { - actions = ",,"; + actions = ""; } else {

actions = methodName;



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dain Sundstrom made changes - 04/Jun/05 12:25 AM
Field Original Value New Value
Description EJBMethodPermissions.MethodSpec have incorrect serialization method. MethodSpec with parameters methodName=null, methodInterface=null, methodParam=null (that should match any method) deserializes with params methodName=null, methodInterface=null, methodParam="" (that matches any no-arg methos)!

As a result, EJB beans with all methods <unchecked/> do not work - AccessControlException is thrown (since methodParam="" means no-arg methods, whille methodParam=null means any methods).

Here is the simple patch:

Index: EJBMethodPermission.java
===================================================================
--- EJBMethodPermission.java (revision 179589)
+++ EJBMethodPermission.java (working copy)
@@ -250,7 +250,7 @@
             if (methodParams == null) {
                 if (methodInterface == null) {
                     if (methodName == null) {
- actions = ",,";
+ actions = "";
                     } else {
 
                         actions = methodName;
EJBMethodPermissions.MethodSpec have incorrect serialization method. MethodSpec with parameters methodName=null, methodInterface=null, methodParam=null (that should match any method) deserializes with params methodName=null, methodInterface=null, methodParam="" (that matches any no-arg methos)!

As a result, EJB beans with all methods <unchecked/> do not work - AccessControlException is thrown (since methodParam="" means no-arg methods, whille methodParam=null means any methods).

Here is the simple patch:

Index: EJBMethodPermission.java
===================================================================
--- EJBMethodPermission.java (revision 179589)
+++ EJBMethodPermission.java (working copy)
@@ -250,7 +250,7 @@
             if (methodParams == null) {
                 if (methodInterface == null) {
                     if (methodName == null) {
- actions = ",,";
+ actions = "";
                     } else {
 
                         actions = methodName;
Affects Version/s 1.0-M4 [ 10970 ]
Assignee Jeff Genender [ jgenender ]
Repository Revision Date User Message
ASF #209985 Sun Jul 10 03:22:20 UTC 2005 djencks GERONIMO-661 unchecked EJBMethodPermissions do not work
Files Changed
MODIFY /geronimo/trunk/specs/j2ee-jacc/src/test/javax/security/jacc/EJBMethodPermissionTest.java
MODIFY /geronimo/trunk/specs/j2ee-jacc/src/java/javax/security/jacc/EJBMethodPermission.java

David Jencks added a comment - 10/Jul/05 12:22 PM
Applied patch and added some tests. Many thanks!!

David Jencks made changes - 10/Jul/05 12:22 PM
Assignee Jeff Genender [ jgenender ] David Jencks [ djencks ]
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 1.0-M4 [ 10970 ]
Resolution Fixed [ 1 ]
David Blevins made changes - 04/Aug/06 10:29 PM
Workflow jira [ 43116 ] RTC Workflow [ 12378822 ]
Alan Cabrera made changes - 07/Aug/06 03:05 PM
Workflow RTC Workflow [ 12378822 ] jira [ 12380593 ]