-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Give SecurityFilterChain a name for tracing! #6274
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
I do not understand the request. Can you please provide more details. |
When there are multipleSecurityFilterChain, eachSecurityFilterChain has multiple filters, and these filters are the same or similar in most cases, during the development period, it is difficult to determine which SecurityFilterChain the request is, it is easy to confuse! Therefore, whether you can give the SecurityFilterChain a name, in the debug log with the corresponding name, I think this is very helpful for debugging and monitoring! |
This sounds like a reasonable idea. I think we can use the beanName which is injected using |
@rwinch > This sounds like a reasonable idea. I think we can use the beanName which is injected using I have implemented BeanNameAware in DefaultSecurityFilterChain. but it won't be helping much Here is pull reuest with above changes: |
1. Implemented BeanNameAware interface in DefaultSecurityFilterChain 2. Added private field beanName for storing beanName. 3. Added method for retrieving beanName Fixes: spring-projectsgh-6274
@ankurpathak I thought the request was for creating multiple FilterChainProxy instances. I think at this point we need to understand exactly what we are looking for before we go further. What exactly is being looked for here? The toString of DefaultSecurityFilterChain already includes the RequestMatcher used which in most cases should help the user know which one is being used. |
|
I think we could add a id property to the request matcher that is then reflected in the toString. This ensures that we don't need to do instanceof checks on the DefaultSecurityFilterChain |
1. Added default method getId in RequestMatcher and marked it as FunctionalInterface 2. Created Class AbstractRequestMatcher with default support for getId logging things 3. Implemented build in matchers using AbstractRequestMatcher 4. Changed toString methods of build in matchers to reflect id. 5. Modified Regex and El RequestMatcher toString tests to reflect new toString. Fixes: spring-projectsgh-6274
Give SecurityFilterChain a name for debug tracing!
The text was updated successfully, but these errors were encountered: