User: stark
Date: 01/01/19 09:20:18
Modified: src/main/org/jboss/ejb/plugins SecurityInterceptor.java
Log:
Throw SecurityException wrapped in a RemoteException so that clients
can simply identify security exception by the type of the nested
exception.
Revision Changes Path
1.9 +4 -6 jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
Index: SecurityInterceptor.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SecurityInterceptor.java 2001/01/10 01:24:00 1.8
+++ SecurityInterceptor.java 2001/01/19 17:20:17 1.9
@@ -36,16 +36,14 @@
import org.jboss.security.RealmMapping;
import org.jboss.security.SecurityAssociation;
-import com.dreambean.ejx.ejb.AssemblyDescriptor;
-
/**
* <description>
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel O'Connor</a>.
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class SecurityInterceptor
extends AbstractInterceptor
@@ -89,7 +87,7 @@
return;
}
if (realmMapping == null) {
- throw new java.rmi.RemoteException("Role mapping manager has not been
set");
+ throw new java.rmi.RemoteException("checkSecurityAssociation", new
SecurityException("Role mapping manager has not been set"));
}
Principal principal = SecurityAssociation.getPrincipal();
@@ -101,7 +99,7 @@
if (principal == null || !securityManager.isValid( principal, credential ))
{
// should log illegal access
- throw new java.rmi.RemoteException("Authentication exception");
+ throw new java.rmi.RemoteException("checkSecurityAssociation", new
SecurityException("Authentication exception"));
}
else
{
@@ -114,7 +112,7 @@
if (methodPermissions != null && !realmMapping.doesUserHaveRole( principal,
methodPermissions ))
{
// should log illegal access
- throw new java.rmi.RemoteException("Illegal access exception");
+ throw new java.rmi.RemoteException("checkSecurityAssociation", new
SecurityException("Illegal access exception"));
}
}