Java + Spring Boot here. I am building a RESTful web service that uses Spring Security for authentication/authorization.
Spring Security ships with a vast array of its own flexible and configurable Filters. My service has a need to define several of its own Filters, however:
- they have absolutely nothing to do with security, and as such, shouldn't require any configuration within Spring Security's API; and
- I do want them to be invoked after Spring Security has already allowed requests through all of its own security Filters; meaning these "non-security" Filters only get invoked if Spring Security has allowed the request through, ahead of time
I see this answer as well as this one but these both involve configuring other custom security Filters to work with Spring Security's built-in Filters. How can I configure Spring Boot to "position" my non-security Filters "after" (further down the filter chain) from Spring Security? And how can I control the order of those Filters once I do?