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

SEC-2730: Provide an order higher than LOWEST_PRECEDENCE for springSecurityFilterChain that's created by WebSecurityConfiguration #2955

Closed
spring-issuemaster opened this issue Oct 1, 2014 · 3 comments

Comments

@spring-issuemaster
Copy link

@spring-issuemaster spring-issuemaster commented Oct 1, 2014

Andy Wilkinson (Migrated from SEC-2730) said:

The springSecurityFilterChain bean that's created by WebSecurityConfiguration is unordered. This means that it's considered to have the default order provided by AnnotationAwareOrderComparator which is LOWEST_PRECEDENCE. This makes the filter go last (or joint last if there are other LOWEST_PRECEDENCE filters configured) when a request is being processed. In a Spring Boot application this makes it difficult for a user to configure their own filter which should run after Spring Security's filter.

@spring-issuemaster

This comment has been minimized.

@rustyx

This comment has been minimized.

Copy link

@rustyx rustyx commented Nov 8, 2018

0 is not a good priority for springSecurityFilterChain, there are many cases when a filter must precede springSecurityFilterChain, for example: character encoding, CSRF, HttpSession, rate-limit, logging & exception handling.

However, something like @Order(100000) should be sufficient to finally fix this issue.

@rwinch

This comment has been minimized.

Copy link
Member

@rwinch rwinch commented Nov 8, 2018

I"m closing this as won't fix. The reason is that Order does not have any meaning on a Filter outside of Spring Boot, so it should (and is) be handled by Spring Boot.

@rwinch rwinch closed this Nov 8, 2018
@rwinch rwinch self-assigned this Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.