Replies: 3 comments 8 replies
-
|
/cc @geoand (kotlin), @pedroigor (oidc), @sberyozkin (jwt,oidc) |
Beta Was this translation helpful? Give feedback.
-
|
I too was having a ton of issues using both extensions and getting the
So I ended up simply grabbing the token off the request:
and then parsing that with |
Beta Was this translation helpful? Give feedback.
-
Just to be clear, this does not mean that OIDC is handling requests, I hope you have other reasons to believe that (like you enabled logging for Would you mind putting together some reproducer? Just so that I don't have to guess what is your actual setup, because this doesn't really provide all the information and if there is actually a bug (or docs issue), I'd like to fix it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a Quarkus 3.24 application that supports two types of authentication:
After reviewing the Quarkus documentation on supporting multiple HTTP authentication mechanisms, I implemented a custom
HttpAuthenticationMechanismto choose between OIDC and JWT based on a custom request header (HELIX-AGENT).However, accessing the JWT is not working as expected and results in inconsistent behavior: injecting
JsonWebTokendirectly in a resource results in aNullJsonWebToken, whereas injectingSecurityIdentityand accessing its.principalproperty correctly returns aDefaultJwtCallerPrincipalcontaining the expected claims from the self-issued JWT.Custom Mechanism Implementation
Problem
After a client logs in, it receives a JWT like this:
The client then includes this token in future requests to the API, along with the HELIX-AGENT header to indicate that it is a client and not a user.
Although the JWT authentication mechanism is selected based on the header, OIDC still appears to be invoked and attempts to parse or introspect the JWT, leading to warnings such as the following:
Additionally, injecting
JsonWebTokeninto a resource results in aNullJsonWebToken, even though injectingSecurityIdentityand accessing its.principalproperty reveals aDefaultJwtCallerPrincipalcontaining all the expected data from the self-issued JWT.Questions
JsonWebTokeninjection resulting in aNullJsonWebToken, even thoughSecurityIdentity.principalcontains a validDefaultJwtCallerPrincipalwith all expected claims?Best regards,
Artur
Beta Was this translation helpful? Give feedback.
All reactions