-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add logging #8589
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
Thanks for raising this, @Budlee. We certainly want to ensure that there's enough logging available. Before knowing what the right change is, let's get on the same page about what is missing. In Spring Security, each authentication filter logs failures at the DEBUG level, so you can do: logging:
level:
org.springframework.security: DEBUG and you'll see failure information, for example when a bearer token fails validation. On the Servlet side, you'll see an exception like:
On the WebFlux side, you'll see a simple message:
I think things can be improved on the WebFlux side, and perhaps they can be improved on the Servlet side as well. Can you elaborate on what information that you aren't able to get that you need? |
@jzheaux this is why i did not see it as I am using reactive for pretty much everything currently. Would you accept a PR that adds more logging to the reactive implementation and are there any constaints? |
Got it, makes sense.
You've come at the right time. :) Logging is something we're taking a look at generally for the 5.4 release. Some initial work on the reactive side was just merged. Now, to set expectations, plenty may change in Spring Security's logging story between now and the release. But, I think one place that would probably give you quite a bit more than you have right now would be to log the full exception in |
@jzheaux i've added some additional debug messages for Jwt and the ReactiveAuth manager. Any suggestions |
Closes gh-8589 Co-authored-by: MattyA <[email protected]>
Closes gh-8589 Co-authored-by: MattyA <[email protected]>
Closes gh-8589 Co-authored-by: MattyA <[email protected]>
Expected Behavior
The Jwt Validators that are provided on the oauth jose package have no logging in them when they fail. It makes it hard when debugging to understand when a Jwt Token has failed and for what reason.
I'm not sure if this is on purpose for security reasons to not log the failure
Current Behavior
No loggin in the default JWT Validators
Context
This has slowed down debugging and understanding which validator has failed.
Debug messages when the logging is set to debug would be helpful.
To get an insight into what JWTs are failing have patched the validators and manually setup the JwtDecoder/ReactiveJwtDecoder.
They can not be extended as they are all Final so patching is the only option.
The text was updated successfully, but these errors were encountered: