-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
OIDC AccessToken can lead to AmbiguousResolutionException #36994
Comments
/cc @pedroigor (oidc), @sberyozkin (oidc) |
@mocenas I think this issue is invalid. |
@sberyozkin I think there is a misunderstanding. Workaround is to define other "defaultFilter" (without any customization) filter. And to use Even using annotation |
Can you please explain why this exception is reported with this combination ? CC @michalvavrik |
@sberyozkin I didn't have a time to investigate when @mocenas wrote about it in QE TS PR, but if it's not a bug, it is something that can be solved anyway. Why should users not be able to use |
I understand this is probably not a common scenario. But still IMHO mere definition of custom filter should not break |
@michalvavrik Thanks,
Please add it to your queue, I agree it is a valid test case scenario, but I'm not too worried about it from the practical point of view as I'm not sure what kind of scenario it covers. |
Describe the bug
Using io.quarkus.oidc.token.propagation.AccessToken annotation on a OIDC client leads to AmbiguousResolutionException if any custom AccessTokenRequestFilter is defined. example of it's definition
Exception is: jakarta.enterprise.inject.AmbiguousResolutionException: Beans: [CLASS bean [class=io.quarkus.ts.security.keycloak.oidcclient.extended.restclient.ping.filters.CustomTokenRequestFilter, id=oJQuCeYWIxp6j-Oe322IFp9iDbk], CLASS bean [class=io.quarkus.oidc.token.propagation.AccessTokenRequestFilter, id=uT_pr1MaC1nPZjXJ_ZSEFBRfYeY]]
This exception occurs, when I try to inject the client.
Expected behavior
Quarkus will inject the client without problem. Annotation @accesstoken should work, even if custom filters are defined.
Actual behavior
Injecting client will fail, because dependency injection can't resolve the filter class.
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
openjdk 11.0.19
Quarkus version or git rev
999-SNAPSHOT
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: