Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secured transitions not working [SWF-1560] #743

Open
spring-operator opened this issue Jul 23, 2012 · 3 comments
Open

secured transitions not working [SWF-1560] #743

spring-operator opened this issue Jul 23, 2012 · 3 comments
Labels
in: integration status: waiting-for-triage We need additional information before we can continue

Comments

@spring-operator
Copy link
Contributor

spring-operator commented Jul 23, 2012

David J. M. Karlsen opened SWF-1560 and commented

I have a transition that is secured:

<transition on="saveSetup" bind="true">
			<secured attributes="hasPermission( 'null', 'SOME_PERMISSION' )" />

and the following configuration of webflow w/ spring security:

<bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener">
     <property name="accessDecisionManager">
          <bean class="org.springframework.security.access.vote.AffirmativeBased">
               <constructor-arg>
                        <bean class="org.springframework.security.web.access.expression.WebExpressionVoter">
                                 <property name="expressionHandler" ref="webSecurityExpressionHandler" />
                        </bean>
               </constructor-arg>
          </bean>
     </property>
</bean>

The webSecurityExpressionHandler is using a custom implementation of a permissionevaluator.

This leads to the following classcast exception:

Caused by: java.lang.ClassCastException: org.springframework.webflow.engine.Transition incompatible with org.springframework.security.web.FilterInvocation
	at org.springframework.security.web.access.expression.WebExpressionVoter.vote(WebExpressionVoter.java:18) ~[spring-security-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:62) ~[spring-security-core-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.webflow.security.SecurityFlowExecutionListener.decide(SecurityFlowExecutionListener.java:95) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.security.SecurityFlowExecutionListener.transitionExecuting(SecurityFlowExecutionListener.java:80) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.impl.FlowExecutionListeners.fireTransitionExecuting(FlowExecutionListeners.java:180) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:392) [spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388) [spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:232) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.ViewState.resume(ViewState.java:196) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.Flow.resume(Flow.java:545) ~[spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258) [spring-webflow-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	... 76 common frames omitted

Affects: 2.3.1

Issue Links:

1 votes, 4 watchers

@spring-operator
Copy link
Contributor Author

Rossen Stoyanchev commented

If you have any chance to put together an issue project that would be very helpful.

@spring-operator
Copy link
Contributor Author

spring-operator commented Jul 26, 2012

Mathieu Rampant commented

see #692 which is pretty much the same issue

@spring-operator
Copy link
Contributor Author

Mathieu Rampant commented

see this post in the forum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: integration status: waiting-for-triage We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

1 participant