[jboss-user] [JBoss AOP] - Re: How do I access security info in a Interceport class?

flavia.rainone@jboss.com do-not-reply at jboss.com
Thu Feb 1 11:52:40 EST 2007


Hi!

The currentDomain static variable is set by the execution of AuthenticationInterceptor. This interceptor is created byAuthenticationInterceptorFactory on this piece of code:


  | SecurityDomain domain = (SecurityDomain) advisor.resolveAnnotation(SecurityDomain.class);
  | if (domain == null) throw new RuntimeException("Unable to determine security domain");
  | try
  | {
  |    manager = (AuthenticationManager) new InitialContext().lookup("java:/jaas/" + domain.value());
  | }
  | catch (NamingException e)
  | {
  |    throw new RuntimeException(e);
  | }
  | ...
  | return new AuthenticationInterceptor(manager);
  | 

This interceptor is bound to the following pointcuts:

  | "all(@security)"
  | "all(@org.jboss.aspects.security.Permissions)"
  | "all(@org.jboss.aspects.security.Unchecked)"
  | "all(@org.jboss.aspects.security.Exclude)"
  | 

Please, verify whether your @all(@ydxt.ejb.aop.FydSecurity) joinpoints are matched by one or more of the pointcuts above. If yes, it should be working, since AuthenticationManager should be executed on the same joinpoints as "MyInteceptor".

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009557#4009557

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009557



More information about the jboss-user mailing list