You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using OIDC client to authorize Rest-Client-Reactive endpoints, failing authorizations result in responses with status 0 and reason phrase null.
Note following code in org.jboss.resteasy.reactive.client.handlers.ClientSetResponseEntityRestHandler#handle:
publicvoidhandle(RestClientRequestContextcontext) throwsException {
ClientResponseContextImplresponseContext = newClientResponseContextImpl(context);
if (context.isCheckSuccessfulFamily()) {
if (Response.Status.Family.familyOf(context.getResponseStatus()) != Response.Status.Family.SUCCESSFUL) {
thrownewWebClientApplicationException(context.getResponseStatus(), context.getResponseReasonPhrase());
}
}
ClientRequestContextImplrequestContext = context.getClientRequestContext();
// the spec doesn't really say this, but the TCK checks that the abortWith entity ends up read// so we have to write it, but without filters/interceptorsif (requestContext != null && requestContext.getAbortedWith() != null) {
setExistingEntity(requestContext.getAbortedWith(), responseContext, context);
}
}
When failing OIDC auth, context.getResponseStatus() is 0 so that Response.Status.Family is not SUCCESSFUL. Thus, a WebClientApplicationException with uninitialized parameters is thrown. On the other hand, the requestContext.getAbortedWith() is a response with status 401 and reason phrase Unauthorized. So that might be used instead?
Describe the bug
When using OIDC client to authorize Rest-Client-Reactive endpoints, failing authorizations result in responses with status
0
and reason phrasenull
.Note following code in
org.jboss.resteasy.reactive.client.handlers.ClientSetResponseEntityRestHandler#handle
:When failing OIDC auth,
context.getResponseStatus()
is0
so thatResponse.Status.Family
is notSUCCESSFUL
. Thus, aWebClientApplicationException
with uninitialized parameters is thrown. On the other hand, therequestContext.getAbortedWith()
is a response with status401
and reason phraseUnauthorized
. So that might be used instead?Update: Reproducer: https://github.com/fwippe/issue-22827
Expected behavior
Response status should be
401
or403
with corresponding reason phrases.Actual behavior
Response status is
0
and reason phrase isnull
.Output of
uname -a
orver
Microsoft Windows [Version 10.0.19042.1415]
Output of
java -version
openjdk version "11.0.3" 2019-04-16 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Additional information
No response
The text was updated successfully, but these errors were encountered: