
Originally Posted by
Rob Winch
What does the rest of your configuration look like?
I can include the XML in a post here if you want to see it.
We do have a custom authenticationProcessingFilter and a custom authenticationProvider. These make sure that the right Authentication object put into the security context. I have been looking at these to see if they might be causing problems. However, no method in either of these classes is ever called during a runAs request (just during authentication).
We are also using Tiles to layout our pages. So we get multiple forwards per request. filterSecurityInterceptor.isObserveOncePerRequest( ) returns true.

Originally Posted by
Rob Winch
Did you ensure to have the SecurityContextPersistenceFilter as the first filter? It is in charge of removing the SecurityContext from the ThreadLocal.
Our channelProcessingFilter was first in the chain. I have moved it so that now the filter chain looks like this:
Code:
<bean id="springSecurityFilterChain" class="org.springframework.security.web.FilterChainProxy">
<security:filter-chain-map path-type="ant">
<security:filter-chain
pattern="/**"
filters
="securityContextPersistenceFilter,
channelProcessingFilter,
logoutFilter,
authenticationProcessingFilter,
securityContextHolderAwareRequestFilter,
anonymousProcessingFilter,
exceptionTranslationFilter,
filterInvocationInterceptor"
/>
</security:filter-chain-map>
</bean>
Maybe this could be set up differently/better? Still this change didn't fix the problem.

Originally Posted by
Rob Winch
NOTE: I was able to produce a load of 40 users concurrently requesting a RUN_AS url and a non RUN_AS url without any problems using 3.1.2 (you might try updating to see if that helps).
I did upgrade to 3.1.2. This also does not help either.
It seems that in AbstractSecurityInterceptor, the afterInvocationManager is null. How can I fix this?
Thanks,
Paul