User: starksm 
  Date: 01/05/09 20:19:54

  Modified:    src/main/org/jboss/ejb/plugins SecurityInterceptor.java
  Log:
  Make the SecurityException msgs more descriptive
  
  Revision  Changes    Path
  1.15      +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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SecurityInterceptor.java  2001/03/30 10:40:58     1.14
  +++ SecurityInterceptor.java  2001/05/10 03:19:54     1.15
  @@ -39,7 +39,7 @@
   
   @author <a href="[EMAIL PROTECTED]">Oleg Nitz</a>
   @author [EMAIL PROTECTED]
  -@version $Revision: 1.14 $
  +@version $Revision: 1.15 $
   */
   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

Reply via email to