User: starksm
Date: 01/05/24 00:04:45
Modified: src/main/org/jboss/ejb/plugins Tag: Branch_2_2
SecurityInterceptor.java
Log:
Improve the SecurityException message
Revision Changes Path
No revision
No revision
1.13.2.2 +8 -5 jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java
Index: SecurityInterceptor.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -u -r1.13.2.1 -r1.13.2.2
--- SecurityInterceptor.java 2001/04/01 01:52:05 1.13.2.1
+++ SecurityInterceptor.java 2001/05/24 07:04:45 1.13.2.2
@@ -39,7 +39,7 @@
@author <a href="[EMAIL PROTECTED]">Oleg Nitz</a>
@author [EMAIL PROTECTED]
-@version $Revision: 1.13.2.1 $
+@version $Revision: 1.13.2.2 $
*/
public class SecurityInterceptor extends AbstractInterceptor
{
@@ -208,8 +208,9 @@
Object credential = mi.getCredential();
if( principal == null || securityManager.isValid(principal, credential) ==
false )
{
- Logger.error("Authentication exception, principal="+principal);
- SecurityException e = new SecurityException("Authentication exception");
+ String msg = "Authentication exception, principal="+principal;
+ Logger.error(msg);
+ SecurityException e = new SecurityException(msg);
throw new RemoteException("checkSecurityAssociation", e);
}
else
@@ -225,8 +226,10 @@
if( methodRoles == null || realmMapping.doesUserHaveRole(principal,
methodRoles) == false )
{
String method = mi.getMethod().getName();
- Logger.error("Illegal access, principal="+principal+" method="+method);
- SecurityException e = new SecurityException("Illegal access exception");
+ String msg = "Insufficient method permissions, principal="+principal
+ + ", method="+method+", requiredRoles="+methodRoles;
+ Logger.error(msg);
+ SecurityException e = new SecurityException(msg);
throw new RemoteException("checkSecurityAssociation", e);
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development