-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update RestEasy Classic mappers and Vert.x HTTP to log messages related to 401 #28157
Conversation
import io.quarkus.security.AuthenticationCompletionException; | ||
|
||
@Provider | ||
public class AuthenticationCompletionExceptionMapper implements ExceptionMapper<AuthenticationCompletionException> { | ||
|
||
private static final Logger log = Logger.getLogger(AuthenticationCompletionExceptionMapper.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you enable debug for this category?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I realized I missed it so converted to Draft :-), checking now with one of the tests expecting 401
@@ -25,6 +27,8 @@ | |||
*/ | |||
@Singleton | |||
public class HttpAuthenticator { | |||
private static final Logger log = Logger.getLogger(HttpAuthenticator.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here.
@@ -92,6 +92,7 @@ public void accept(Throwable throwable) { | |||
} | |||
}); | |||
} else if (throwable instanceof AuthenticationCompletionException) { | |||
log.debug("Authentication has failed, returning HTTP status 401"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here.
28652ba
to
319b9f8
Compare
I enabled |
was not sure about lower case |
One of the OIDC refresh tests failed again today in #28142 however the raw logs show nothing related to the source of
401
despite me covering all of theCodeAuthenticationMechanism
code related to producing 401.It may suggest that
401
is likely reported from elsewhere, either from Vert.x HTTP or ResteasyClassic exception mappers, so here is one more and very likely the final attempt to trace it before disabling it as I really see no other sources of 401 or any reasons for it in the OIDC code:testRPInitiatedLogout
test as it might be that logging out the user from alogout-realm
and then signing in to the same realm and auto-refreshing might be causing some transient side-effects in KC