[JBoss Seam] - Security and pageflows in SEAM 1.2.1GA
by rhardy5014
Hi,
I am in the process of migrating an application from SEAM 1.1.6GA to 1.2.1GA and I am having a problem with the security configuration in my application.
I use pageflows, with the transition in question being the "login" transition in the code below:
| <start-page name="login" view-id="/faceletsPages/loginPage.xhtml">
| <redirect/>
|
| <transition name="alreadyLoggedIn" to="loggedIn"/>
|
| <transition name="login" to="checkLogin">
| <action expression="#{identity.login}"/>
| </transition>
|
| </start-page>
When this transition executes, I get an exception as follows:
09:20:31,869 ERROR [GraphElement] action threw exception: couldn't evaluate expr
| ession '#{identity.login}'
| org.jbpm.JbpmException: couldn't evaluate expression '#{identity.login}'
| at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpression
| Evaluator.java:38)
| at org.jbpm.graph.def.Action.execute(Action.java:119)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
| at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
|
| at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.ja
| va:182)
| at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
| at org.jbpm.graph.def.Transition.take(Transition.java:106)
| at org.jbpm.graph.def.Node.leave(Node.java:383)
| at org.jbpm.graph.exe.Token.signal(Token.java:178)
| at org.jbpm.graph.exe.Token.signal(Token.java:141)
| at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:229)
| at org.jboss.seam.pageflow.PageflowHelper.signal(PageflowHelper.java:47)
|
| at org.jboss.seam.core.Pageflow.navigate(Pageflow.java:298)
| at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigat
| ionHandler.java:30)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
| nListenerImpl.java:84)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.j
| ava:180)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot
| .java:158)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewR
| oot.java:329)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(Lifecycl
| eImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
| :86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extensions
| Filter.java:97)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extensions
| Filter.java:97)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extensions
| Filter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
| a:63)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
| a:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
| a:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
| a:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseX
| MLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.
| java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:105)
| at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
| 541)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
| rocessConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
| int.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
| kerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jbpm.jpdl.el.ELException: Unable to find a value for "login" in o
| bject of class "org.jboss.seam.security.RuleBasedIdentity" using operator "."
| at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:482)
| at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:499)
| at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:612)
| at org.jbpm.jpdl.el.impl.ArraySuffix.evaluate(ArraySuffix.java:303)
| at org.jbpm.jpdl.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
| at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEval
| uatorImpl.java:264)
| at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEval
| uatorImpl.java:191)
| at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpression
| Evaluator.java:34)
| ... 64 more
This used to work in SEAM 1.1.6. Does anyone have any ideas as to whether I am doing something wrong now?
Thanks,
Richard.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036981#4036981
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036981
19 years
[EJB 3.0] - Security Annotations / Overriding annotations with deploymen
by zetzioni
Hi,
It's a couple of questions really, the first is security related, second is annotation related:
1. Is it possible (in a standard non JBoss specific) to use @RolesAllowed and the rest of role based annotations but someohow override the default container behavior (which in JBoss is the rolebased interceptor)? The reason I"m asking that is, that in my application I need slightly different behavior for access control check than the standard, but I don't want to replace the whole security manager with JACC. So what I've done is avoid using the standard RolesAllowed annotations, and introduced MyRolesAllowed annotations. That way I will avoid invoking the standard mechanism of the container, and plugin my behavior as an EJB3 interceptor. Is there a way around it?
2. So I've created an annotation which I use to annotate bean methods @MyRolesAllowed, and I want to be able to override it for the method in the deployment descriptor. Can this supported?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036972#4036972
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036972
19 years
[JBoss AOP] - Re: Linking Aspect makes interception not working for a shor
by waffels
ok,
i have just the AspectManager to link and unlink the aspects:
these are the methods i use to create and link the aspects
public static void create(String aspect_id, String className){
System.out.println("create aspect-id="+aspect_id+" classname="+className);
AspectFactory af = new GenericAspectFactory(className, null);
AspectDefinition ad = new AspectDefinition(aspect_id, Scope.PER_VM, af);
AspectManager.instance().addAspectDefinition(ad);
}
public static void link(String aspect_id, String methodname,String binding,String binding_id){
System.out.println("link aspect_id="+aspect_id+" method="+methodname+" binding="+binding+" binding_id="+binding_id);
AdviceBinding adviceBinding=null;
try {
adviceBinding = new AdviceBinding(binding,null);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
AspectDefinition ad = AspectManager.instance().getAspectDefinition(aspect_id);
adviceBinding.addInterceptorFactory(new AdviceFactory(ad, methodname));
adviceBinding.setName(binding_id);
AspectManager.instance().addBinding(adviceBinding);
}
So all the bindings have their personal ID,
to unlick them i use
public static void unLink(String binding_id){
System.out.println("unlinking "+binding_id);
AspectManager.instance().removeBinding(binding_id);
}
as for the application itself:
There's a client which is connected to a server using Jboss RMI with transport using an interface,
The client is also connected to a third pc which gives the orders to the client to link/unlink aspect in a seperate thread
the main client thread jusdt looks something like this:
for (int i = 0 ; i < 40000; i++) {
try {
System.out.println(stub.receiveMessage(new Integer(i).toString()));
} catch (RemoteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
Thread.sleep(10);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
it just sends out numbers to the server...
the server just prints those numbers out
now iun the regular case the numbers get compressed at clientside before they are send to the server, and at the serverside they are decompressed before printed out, so that just gives something like:
client:
"compressing message 1"
"sending message 1"
server:
"decompressing message..."
received message: 1
then client:
message 1 received at server
then message2 and so on...
but now: when i send at frequentie of 10 ms and i link an arbitrary aspect at an arbitrary place at the clientside (in another thread than the sending thread)
it causes some messages at the clientside NOT to compress, so while linking the arbitrary aspect, there occur no interceptions at the clientside...
serverside then tries to decompress them which obviously doesn't work...
hope this help you understand it better
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036970#4036970
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036970
19 years