Description
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:
Note that you can’t replace filters which are created by the use of the element itself
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