Improve logging for Global Authentication#14711
Conversation
jzheaux
left a comment
There was a problem hiding this comment.
@Kehrlann, thank you! Aside from my inline comments, I think regarding logging levels we should consider whether it is ever correct to arrange a Spring application with two AuthenticationProvider beans. If it is, then I think DEBUG is a better level so that folks who intentionally have two don't get bugged for eternity by a needless message.
I lean towards DEBUG, but I'm open to your reflection as well.
...tion/authentication/configuration/InitializeAuthenticationProviderBeanManagerConfigurer.java
Outdated
Show resolved
Hide resolved
...nfig/annotation/authentication/configuration/InitializeUserDetailsBeanManagerConfigurer.java
Show resolved
Hide resolved
|
@jzheaux thank you for the review, addressed the comments. Thinking about it, I agree that two If a single |
|
Thanks, @Kehrlann! This is now merged into |
Closes gh-14663
See the issue for use-case matrix.
Open questions
I'd like to draw your attention to the following:
Example log lines:
1 UserDetailsService ;
INFOlevel:2 UserDetailsService ;
WARNlevel:1 AuthenticationProvider and at least 1 UserDetailsService bean,
WARNlevel:1 AuthenticationProvider,
INFOlevel:2 AuthenticationProviders,
WARNlevel:Interaction between the configurers
When the two configurers produce log lines, here are a few examples:
2 AuthenticationProvider, 1 UserDetailsService:
2 AuthenticationProviders, 1 UserDetailsService: