Spring Security
  1. Spring Security
  2. SEC-1186

Move namespace element <custom-filter> into <http> block.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 3.0.0 M1
    • Fix Version/s: 3.0.0 M2
    • Component/s: Namespace
    • Labels:
      None

      Description

      The decorator approach complicates things when it comes to parsing the filter list and makes it difficult to provide proper tooling integration (since we have to rely on a bean processor to build the final filter list). This approach makes sense with the AuthenticationManager since the implementation is not visible, but it would make things clearer if the <http> block contained a complete definition of the filter list, rather than having to scan through the rest of the configuration for filter beans with <custom-filter> in them.

      So we would have

      <http>
      <intercept-url ...>
      <form-login />
      <custom-filter ref="filterBean" position="whatever"/>

      </http>

      The existing bean parser can be modified to provide a suitable message and example of the new syntax.

        Issue Links

          Activity

          Hide
          Luke Taylor added a comment -

          I've added the code to make this possible and remove the decorator-based approach. This has also led to other major changes in parsing the <http> element. The filter chain is now created entirely during parsing as a list of bean definitions and this should improve the representation in Spring IDE. Many of the global bean identifiers for filters have been removed completely, sine there is no longer any need to access them elsewhere. If necessary, the beans are registered using a generated name.

          Show
          Luke Taylor added a comment - I've added the code to make this possible and remove the decorator-based approach. This has also led to other major changes in parsing the <http> element. The filter chain is now created entirely during parsing as a list of bean definitions and this should improve the representation in Spring IDE. Many of the global bean identifiers for filters have been removed completely, sine there is no longer any need to access them elsewhere. If necessary, the beans are registered using a generated name.

            People

            • Assignee:
              Luke Taylor
              Reporter:
              Luke Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: