0 Replies Latest reply on Jul 14, 2004 8:10 AM by kado0002

    AOP Security+AOP Remoting

    kado0002 Newbie

      I use AOP Security Service and it works. But when I use AOP Remoting with the security service I got a lot of problems.
      Always when I want to execute a secured method of an object, which is called by the remote proxy object I get an Authentication exception.

      Example:
      jboss-aop.xml

      <annotation tag="security" class="de.fhzw.portal.util.classes.UserSession">
       <security-domain>java:/jaas/RoomAdministration</security-domain>
       <method-permission>
       <role-name>Internal</role-name>
       <method>
       <method-name>*</method-name>
       </method>
       </method-permission>
      </annotation>

      class UserSession:
      public class UserSession{
      
       ...
      
       public String getUserName(String principal)
       {
       return getUserReader().getUserName(principal);
       }
       ...
       }

      Clientcode to get a remote Object:
      UserSession user = (UserSession)
       Remoting.createRemoteProxy("UserSession",UserSession.class,"socket://localhost:5150");
       user.getUserName("someName");
      

      A User Session Object is created in a MBean- method on the Server. This method registers the UserSession object by the Dispatcher too.
      when the method is called I get an Authentication Exception!
      But when I execute the method in a MBean on the Server on the orginal object the example runs!

      What's my fault?