-
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
Support for two or more authentications for a single request #42935
Conversation
michalvavrik
commented
Sep 1, 2024
•
edited
Loading
edited
- Closes: Support for inclusive authentication #31328
- Supersedes: Support for two or more authentications for a single request #31329
- many parts (OIDC, docs, tests) are just taken from Sergey's PR and tweaked
- main difference to Support for two or more authentications for a single request #31329 is that I addressed Stuarts concerns with new approach in Vert.X HTTP
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Interesting, I have run that test like 10 times, including native mode, never failed. I am going to look what is different in CI. |
So what has changed is that I am getting exception here https://github.com/quarkusio/quarkus/blob/main/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcProviderClient.java#L176 for OIDC client is is now missing. |
@sberyozkin do you think you could investigate failures? they are caused by #41866 and I don't see anything wrong about OIDC setup in this PR. You have way better chance to figure it quickly as I think it might be a bug introduced in #41866. Thank you |
Hi @michalvavrik I'm pretty sure the OIDC client reg work is unrelated - it is only about registering client dynamically, in fact, independently of |
@michalvavrik Major thanks by the way for picking up the old PR and concluding this work, it will be a very important feature |
Hmm, but I reverted that registration and this worked like a charm. I really think that your PR is related, but if you want, I can investigate it myself. NP, I just thought you are better poised to it. The fact is that this line now throws exception and it didn't: https://github.com/quarkusio/quarkus/blob/main/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/OidcProviderClient.java#L176 I can investigate though.
I actually enjoyed it, it was nice little work that had to be done in Vert.X HTTP, nothing else :-) |
...untime/src/main/java/io/quarkus/vertx/http/runtime/security/MtlsAuthenticationMechanism.java
Show resolved
Hide resolved
@michalvavrik May be https://github.com/quarkusio/quarkus/pull/41866/files#diff-67404a43520250b1ebd5a0c945e070e60d70d4a3ba06b15e3fac747f820320cc are related though I'm not seeing how, I had to tweak the conditions for starting Keycloak Dev Services (to support starting even if the default tenant is disabled, and avoid registering default client). It looks like the default client is not registered by dev service |
It must be this one: Though again, I'm not sure exactly now why I did it |
Cool, I knew I'll figure it out :-) Thanks for having a look after all. |
@michalvavrik Let me try to run OIDC client reg tests without those client id/secret updates to remind myself why I did it |
#42947 has been merged, please rebase |
265398f
to
db8c1bc
Compare
This comment has been minimized.
This comment has been minimized.
db8c1bc
to
13e8f26
Compare
Status for workflow
|
Status for workflow
|
/cc @stuartwdouglas I believe I addressed all your comments. Not sure if you are busy these days, but if you find a moment, please have a look. |
...rtx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/security/HttpSecurityUtils.java
Show resolved
Hide resolved
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.
Looks perfect to me. For OIDC Mutual TLS binding work, I can get a map of current security identities, get the MTLS one and extract the required data from the certificate to match them against the token
@michalvavrik Thanks, only minor JavaDocs comment, indeed, lets see if Stuart can comment during the next couple of days |
Let's merge now |