Announcement Announcement Module
Collapse
No announcement yet.
FilterChainProxy problem Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FilterChainProxy problem

    My FilterChainProxy does not seem to be working (1.0.0 RC2). If I step through the code, it is being intialized correctly with an applicationContext and a filterInvocationDefinitionSource, but when it tries to get a ConfigAttributeDefinition in doFilter(), it can't find any matching filters. So, I'm getting a 404 not found on my j_acegi_security_check, presumably because it never enters the authenticationProcessingFilter.

    security.xml:

    <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
    <property name="filterInvocationDefinitionSource">
    <value>PATTERN_TYPE_APACHE_ANT /**=authenticationProcessingFilter,exceptionTransla tionFilter,filterSecurityInterceptor</value>
    </property>
    </bean>


    web.xml:

    <!-- - - - - - - - ACEGI FILTERS - - - - - - - - -->
    <filter>
    <filter-name>FilterChainProxy</filter-name>
    <display-name>FilterChainProxy</display-name>
    <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
    <param-name>targetClass</param-name>
    <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
    </init-param>
    </filter>
    <!-- - - - - - - - END ACEGI FILTERS - - - - - - - - -->
    <filter-mapping>
    <filter-name>FilterChainProxy</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    Any help is appreciated.

    Thanks

  • #2
    Not sure if this is your problem, it doesn't sound like it, but did you read the rc1 to rc2 notes?

    http://acegisecurity.org/upgrade/upgrade-090-100.html


    Also, I recently posted my minimal acegi config for a web form authentication to this forum. You might look at that.

    Comment


    • #3
      Originally posted by Seabamirum
      <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
      <property name="filterInvocationDefinitionSource">
      <value>PATTERN_TYPE_APACHE_ANT /**=authenticationProcessingFilter,exceptionTransla tionFilter,filterSecurityInterceptor</value>
      </property>
      </bean>
      The PATTERN_TYPE_APACHE_ANT directive and filter chain should be on separate lines.

      Comment


      • #4
        One thing that has always bothered me; why doesn't filterInvocationDefinitionSource use <list> instead of just having the programmer plop down a gob of text? (Where the gob's "format" isn't well documented in my opinion.) E.g.,
        Code:
        <property name="filterInvocationDefinitionSource">
            <list>
                <value>CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON</value>
                <value>PATTERN_TYPE_APACHE_ANT</value>
                <map>
                    <entry key="/**">
                        <list>
                            <value>httpSessionContextIntegrationFilter</value>
                            <value>casProcessingFilter</value>
                            <value>exceptionTranslationFilter</value>
                            <value>filterSecurityInterceptor</value>
                        </list>
                    </entry>
                </map>
            </list>
        </property>
        Admittedly it's a lot more to type, but that's the price we pay for using xml. It's certainly clearer and cleaner in my opinion.

        Every time I see these text gobs in the config files it's like fingernails on a chalkboard to me.

        Comment


        • #5
          It was based on the other java.util.Properties-based configuration of Acegi Security, which in turn was based on the Spring Transaction services configuration. Therefore it's just a framework-consistency issue. In practice I haven't seen it cause many issues.

          Comment

          Working...
          X