-
Notifications
You must be signed in to change notification settings - Fork 3k
Allow to keep JWT audience trailing slash #51144
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
Conversation
...nsions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/runtime/OidcCommonUtils.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
michalvavrik
left a comment
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.
to add a property to control the buggy OIDC behavior to an already massive set of existing OIDC props :-)
Personally, I'd call it undocumented behavior. I understand that #51133 has API that accepts aud with the ending slash. And we should give them way to end it with slash other than to add two slashes. I tried to look it up and it seems to be common to have the URI without ending slash.
This comment has been minimized.
This comment has been minimized.
|
Hi Michal, @michalvavrik
Right, but users who do not need a slash already have an option not to add it, instead of adding it and expecting it be removed... When it comes to configuring an audience, the configured value, whatever it is, is a user provided value - users have already expressed a requirement with something like I'm not aware of any OIDC spec text that would require that the JWT audience claim value must not end with Sigh... having said all of that, I think with a property this PR can become bacportable... Let me think about this property |
1649db9 to
6ec9ca6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🙈 The PR is closed and the preview is expired. |
michalvavrik
left a comment
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.
+1
6ec9ca6 to
91da575
Compare
|
Thanks @michalvavrik, @gastaldi, so I added a property to allow keeping the trailing slash (default is false as on |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
91da575 to
e04e32b
Compare
Status for workflow
|
Status for workflow
|
Fixes #51133.
I did a mistake 4 years ago in 4a42b44 where the audience property had its trailing slash, if present, removed in
OidcCommonUtils#signJwtWithKey, because this is what was necessary to get the Keycloak test passing (Keycloak realm endpoint URL is used as an audience by default), but it is really inapplication.propertieswhere the users should deal with having the trailing slash present or not.There is also
quarkus.credentials.jwt.audienceproperty that can always be used to customize it.