Is using Keycloak embedded with spring boot a bad idea or not?

1,520 views
Skip to first unread message

Rasool Ghafari

unread,
Apr 24, 2023, 7:46:36 AM4/24/23
to Keycloak User
I working on a legacy project that uses Keycloak 11. recently, I found this repository I realized that we can use Keycloak embedded with Spring Boot. So, I moved the project this way but there was a problem. When I tried to make it clustered I faced a problem described here on stackoverflow.com:


When I sent this question to someone that working on keycloak, they said that this isn't a good idea because the upstream project (Keycloak) doesn't support this way.

So, I want to know what to do and what not to do. how can I solve my problem and what will happen when I upgrade the version of keycloak from 11 to newer (e.g. 21) in this way?
As Keycloak said on their website, they are using Quarkus on the newer version. can I use the new version of Keycloak embedded with Spring Boot?

Adebowale Gbenga

unread,
Apr 24, 2023, 9:00:35 AM4/24/23
to Rasool Ghafari, Keycloak User
Hi Rasool, 

I have had this idea before but frankly, that's like making a pet project look like a real production managed application.

It's a terrible idea, for one you are limiting the power of Keycloak (An identity Management platform) that can be used across an entire organization for much more.

You can even use it for applications unrelated to Java in the future. Besides, it's supposed to expose a separate port address that SpringBoot will clutter. That's aside the problem you just ran into 
(clustering and auto-scaling).

So, Yes it's better managed as a separate instance(or cluster) not lumped with any specific deployment or application.

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/37949ed8-489f-4f08-b467-abff3d99b02fn%40googlegroups.com.

rasool ghafari

unread,
Apr 24, 2023, 10:13:14 AM4/24/23
to Adebowale Gbenga, Keycloak User
Thanks for your consideration and time. In the meantime, i have another question.
if the way that i used is wrong, why the Keycloak team is contribiuting this project ?
As you can see it is up to date to the latest version is 21.1.0 as same as upstream project.

Reply all
Reply to author
Forward
0 new messages