-
Notifications
You must be signed in to change notification settings - Fork 264
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
SecurityStrategy logs twice #334
Comments
To clarify, I had an error with filter ordering. So my filter causing the 401 response was to low of precedence. However, with the automated error handling of Spring Boot, the problem remains. |
Can you try to remove spring-security from your classpath? That should fix it. Proper fix within Logbook would be to not rely on Line 281 in b2c5cc3
We should rather use |
Our setup assumes that the security filter runs in between our two logbook filters, iirc. If your application logic or a filter further down the chain causes 401 then you will see the output twice. There is no easy fix that I can think of right now. |
I actually have no Spring Security, so I added I like the idea of the security strategy to skip the body for 401 responses. |
Error dispatch isn't really properly supported in logbook. You try to remove the ERROR dispatcher type from your customized version. That may help. |
If I register both filter beans without the error dispatcher, I get the desired result |
I have a similar problem. Would it be a proper solution that the |
@JanWaller Maybe you can just exclude the |
This will become the default as of #437 |
If I add a second LogBook Filter with Strategy.SECURITY, my calls resulting in 401 get logged twice. Once unfiltered with the whole body by the normal filter and once by the security filter.
I use Spring Boot without Spring Security.
What am I missing?
The text was updated successfully, but these errors were encountered: