-
Notifications
You must be signed in to change notification settings - Fork 6.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
Inclusion of resteasy-jackson2-provider
in a Keycloak extension causes build failure
#25589
Comments
@xgp Can you include the required |
I can try this.
Can you explain exactly what this does? What is special about this library that requires a custom build of Keycloak? Are there other libraries with the same requirements? Is there any documentation that explains this?
Thank you!
|
I am getting a build error when I do as suggested by @koplas...would be curious to know if yours builds. |
The following works for me:
I have not tested it, but now you should be able to use the
Keycloak provides a couple of dependencies that the extension can use. For example, I have a similar problem and the documentation and upgrade guide only mentions that the usage is deprecated and the application should be rewritten. Someone with Quarkus and Keycloak expertise can provide the intended way of including dependencies into the extension. |
Thanks @koplas . It needed the
I appreciate your explanation, but I still don't really understand what is going on or why it requires a custom build. Does it have to do with those I've been using the Keycloak Admin Client in extensions since version 9, and there has always been some problem. Between having to build your own module, RESTEasy dependency/version hell, and now this. It really makes the case to stop using it altogether. |
I'm also facing the same issue. Will this be fixed in a future version? Thanks. |
This is more of an issue of how Quarkus handles extensions and not a keycloak specific problem. |
The root cause for this problem seems to be that different |
I am adding to Backlog as not sure when Keycloak team has capacity to prioritize this. Anyone is welcome to investigate and send PR with fixing this if it can be fixed on Keycloak side in a nice way. See contributions guide for the details how to contribute a fix https://github.com/keycloak/keycloak/blob/main/CONTRIBUTING.md . The possible workaround is also to not use keycloak-admin-client in your providers. As long as provider is deployed in Keycloak, it might be an option to use model-api directly (for example use something like |
Thanks @mposolda The diff that I sent solves it, but it causes the admin client to be bundled in Keycloak. Because there is not an external way to solve the use of the admin client, we found this to be the only way. I can PR that diff, but I'm not sure if Keycloak is willing to accept the addition of a library that is only depended on by extensions. Regarding your workaround suggestion, I agree with using the Anyway, LMK if you would consider the diff as a PR, and I'll create a ticket and submit it. |
We won't include the admin client in the dist that's for sure, so we need some other solution. I'd give this a go and see if it works: https://quarkus.io/guides/security-keycloak-admin-client |
Thanks for the clarification on including the admin client @stianst I tried the quarkus "security-keycloak-admin-client" and I wasn't able to get it to work from inside Keycloak. |
Due to the amount of issues reported by the community we are not able to prioritise resolving this issue at the moment. If you are affected by this issue, upvote it by adding a 👍 to the description. We would also welcome a contribution to fix the issue. |
Due to lack of updates in the last 180 days this issue will be automatically closed. |
Before reporting an issue
Area
admin/client/java
Describe the bug
Sometimes extensions include the use of
keycloak-admin-client
, which depends onresteasy-jackson2-provider
. >=23, after the upgrade to resteasy reactive, this seems to cause a build problemVersion
23
Expected behavior
This should allow the
resteasy-jackson2-provider
jar to be included in theproviders/
dir.Actual behavior
How to Reproduce?
Create a
Dockerfile
that extends the base image with theresteasy-jackson2-provider
jar in theproviders/
dir and then runsbuild
.Anything else?
Already noticed here #25265
Tried on
nightly
.The text was updated successfully, but these errors were encountered: