-
Notifications
You must be signed in to change notification settings - Fork 6k
SEC-3156: Cannot replace a standard filter #3366
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
Comments
It sounds like what you want is to invoke a separate filter chain per set of URLs. It's not clear to me why this is a problem, but perhaps you could elaborate?
Assuming, though, that a custom metadata source is what you need, the metadata source can be changed through an Or Spring Security 5.5 released a new API that supercedes http
.authorizeHttpRequests((authorize) -> authorize
.anyRequest().access(myAuthorizationManager)
); (XML support forthcoming) Where |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Keith Garry Boyce (Migrated from SEC-3156) said:
It says here that a filter can be replaced.
position The explicit position at which the custom-filter should be placed in the chain. Use if you are replacing a standard filter.
Then here is says:
I have a use case where I want a bean to maintain the set of intercept urls that pertain to a particular http tag. Hence I either need to replace the FilterSecurityInterceptor with one where I can pass my own SecurityMetadataSource or the code base needs to be modified where I can supply my own custom SecurityMetadataSource per http tag.
I see no reason why this restriction is in place. Also if there is a valid reason then the documentation should be changed so there is no conflict.
I'm at a loss currently as to how to implement my usecase without replacing the entire filter chain which I would prefer not doing. The after and before attributes could be made smarter so it's not just a -1 or +1 on the order and intead an offset attribute could allow me to specific the number to add to the order so I can have up to 100 things between the standard filters rather than just 2
The text was updated successfully, but these errors were encountered: