-
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 docs to make it easy to see that the code flow access token fails, update tests #40523
Update docs to make it easy to see that the code flow access token fails, update tests #40523
Conversation
docs/src/main/asciidoc/security-oidc-bearer-token-authentication.adoc
Outdated
Show resolved
Hide resolved
docs/src/main/asciidoc/security-oidc-code-flow-authentication.adoc
Outdated
Show resolved
Hide resolved
extensions/oidc/runtime/src/main/java/io/quarkus/oidc/OidcTenantConfig.java
Outdated
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.
I think this will help users. Thank you
This comment has been minimized.
This comment has been minimized.
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
The associated issue number seems wrong? |
Good catch! I thought this issue is about #40494. |
Thanks @michalvavrik , @gastaldi , will address suggestions tomorrow morning, as I'm away from laptop, cheers |
Converted to draft as the exception related update is not great, need to improve it |
ce74a0b
to
e558e84
Compare
Hi @michalvavrik @gastaldi I'm happy enough now with how it is logged, the previous version was unfortunately incomplete, it was covering the initial authorization code completion failure logging but not the one during the re-authentication (when the authenticated user returns), and I've actually spent a couple of hours trying to figure out how to make it simpler :-), as I thought there was no obvious way at the code authentication mechanism level to detect which token failed the verification, but then I found the current boolean expression which is precise. |
This comment has been minimized.
This comment has been minimized.
docs/src/main/asciidoc/security-oidc-bearer-token-authentication.adoc
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ils, update tests
aec5b6e
to
f030a33
Compare
@gastaldi Yeah, it looks nicer with your suggestion, applied to both docs |
Status for workflow
|
Status for workflow
|
Closes #40494.
I've spent a lot of time today testing #40494 and so is @effusion :-), verifying several times all works as expected with latest Quarkus with the custom Azure customizer, but it was not clear at all why it worked in 3.8.3.
In the end of the day it occurred to me it must be due to a hardening (correct) fix where users inject an authorization code flow access token but do not enable its verification, in addition to the mandatory ID token verification. So the signature failure reported in #40521 was related to the extra code flow access token verification but is confusingly logged as ID token verification failure.
So this PR updates docs to make it much clearer when the code flow access token is also verified now and how it can be disabled back to the old (though not too secure state, if really necessary). Tests are also updated (with an extra UserInfo test too).
Note it is not a breaking change, but I'll add a note to the migration guide too once this PR is reviewed/merged