
Originally Posted by
Ben Alex
Hi Matt
Perhaps try the following re-ordering so more specific URLs are at the top:
Code:
<bean id="filterChainProxy" class="net.sf.acegisecurity.util.FilterChainProxy">
<property name="filterInvocationDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/j_security_check=authenticationProcessingFilter
/*.html*=anonymousProcessingFilter,securityEnforcementFilter
/**=httpSessionContextIntegrationFilter
</value>
</property>
</bean>
I tried this and it first resulted in the following error when I first try to hit the application.
Code:
java.lang.IllegalStateException: ContextHolder invalid: 'null': are your filters ordered correctly? HttpSessionContextIntegrationFilter should have already executed by this time (look for it in the stack dump below)
at net.sf.acegisecurity.context.security.SecureContextUtils.getSecureContext(SecureContextUtils.java:38)
at net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:136)
So I added httpSessionContextIntegrationFilter to the start of the /*.html* mapping and it resulted in a 404 when going to /j_security_check.
This seems to be the only thing that works:
Code:
<bean id="filterChainProxy" class="net.sf.acegisecurity.util.FilterChainProxy">
<property name="filterInvocationDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,remoteUserFilter,anonymousProcessingFilter,securityEnforcementFilter
</value>
</property>
</bean>
Matt