-
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
Add custom aud for OidcWireMock testing doc #43949
base: main
Are you sure you want to change the base?
Add custom aud for OidcWireMock testing doc #43949
Conversation
🎊 PR Preview 5c3944b has been successfully built and deployed to https://quarkus-pr-main-43949-preview.surge.sh/version/main/guides/
|
Status for workflow
|
Thanks @douglas444, I was thinking about it, and I wonder if we can just fix OidcWiremock instead to follow the OIDC spec requirement for ID token's audience be set to the client id. I can't find anywhere how to use a POST url form encoded parameter like This code must be updated, I've tried:
replacing Can you experiment please, and try to find the way to refer to the |
@sberyozkin I guess wiremock can't replace the placeholder because when Anyway, yes, I will experiment and let you know when I find a solution! Thank you for the reply! |
Thanks @douglas444, yeah, I forgot that the client id is coming by default in the Basic scheme, while not everyone is using a client post form authentication. Indeed, the only option is likely to be a custom transformer, have a look please |
That said, if requiring users setting the client post authentication option to have something like |
As mentioned in this discussion, Quarkus now enforces that the ID token aud is set to the client id and because the OidcWiremock code was created earlier, the ID token granted sets the aud to https://id.server.example.com. Because of that, tests that use OidcWireMockTestResource will not work unless the aud is customized through the
quarkus.oidc.token.audience
property.This PR updates the documentation to customize the audience used in the example for code-flow testing with OidcWireMock, making the example functional.