[Security & JAAS/JBoss] - @PermitAll and UnauthenticatedIdentity
by jej2003
The Java Docs for PermitAll say the following
anonymous wrote : Specifies that all security roles are allowed to invoke the specified method(s) i.e that the specified method(s) are "unchecked". It can be specified on a class or on methods. Specifying it on the class means that it applies to all methods of the class. If specified at the method level, it only affects that method. If the RolesAllowed is specified at the class level and this annotation is applied at the method level, the PermitAll annotation overrides the RolesAllowed for the specified method.
After reading this I had assumed that by having an unauthenticatedIdentity set up in my login-config.xml file for the appropriate JAAS Domain anyone would be able to access that particular method. This does not seem to be the case though. In short what needs to be done to allow an unauthenticated user to be able to invoke a method on an EJB that is secureded by a JAAS domain?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184469#4184469
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184469
17 years, 6 months
[JBoss AOP] - Field visibility and aspect
by mane81
Hi,
if I have a class with an enclosed class like this
Class POJO {
private String aField;
...
class AnotherClass {
public void someMethod() {
aField = "something";
}
}
}
and I add an aspect at runtime through these instructions:
AdviceBinding binding = new AdviceBinding("execution(public boolean Pojo>getCond())", null);
binding.addInterceptor(SimpleAspect.class);
AspectManager.instance().addBinding(binding);
An exception is thrown:
Exception in thread "main" java.lang.NullPointerException
at org.jboss.aop.pointcut.MethodMatcher.(MethodMatcher.java:72)
at org.jboss.aop.pointcut.ExecutionMethodMatcher.(ExecutionMethodMatcher.java:53)
at org.jboss.aop.pointcut.PointcutExpression.matchesExecution(PointcutExpression.java:118)
at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:1333)
at org.jboss.aop.GeneratedClassAdvisor.resolveMethodPointcut(GeneratedClassAdvisor.java:309)
at org.jboss.aop.ClassAdvisor.resolvePointcuts(ClassAdvisor.java:751)
at org.jboss.aop.ClassAdvisor.doRebuildInterceptorsForAddedBinding(ClassAdvisor.java:1160)
at org.jboss.aop.ClassAdvisor$RebuildInterceptorsAction$2.rebuildInterceptorsForAddedBinding(ClassAdvisor.java:2348)
at org.jboss.aop.ClassAdvisor.rebuildInterceptorsForAddedBinding(ClassAdvisor.java:1139)
at org.jboss.aop.GeneratedClassAdvisor.access$1501(GeneratedClassAdvisor.java:65)
at org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.rebuildInterceptorsForAddedBinding(GeneratedClassAdvisor.java:1538)
at org.jboss.aop.GeneratedClassAdvisor.rebuildInterceptorsForAddedBinding(GeneratedClassAdvisor.java:244)
at org.jboss.aop.Advisor.newBindingAdded(Advisor.java:1124)
at org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(AspectManager.java:1498)
at org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(AspectManager.java:1521)
at org.jboss.aop.AspectManager.addBinding(AspectManager.java:1456)
at Caller.run(Caller.java:36)
at Caller.main(Caller.java:57)
If the field visibility is public the exception is not thrown anymore.
Can someone tell me why?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184450#4184450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184450
17 years, 6 months