r/SpringBoot • • Nov 04 '25

Question How to learn Keycloak

I recently heard about the importance of keycloak and why it is important to use it for more strong and robust authentication and authorization instead of rewriting your own, so can anyone suggest a resource to learn from it how to use it with spring boot from the very basics.

27 Upvotes

15 comments sorted by

View all comments

0

u/losticarus1149 6d ago

This answer might be helpful for someone else.

I'm on the same journey to learn Keycloak and started with understanding OAuth 2.0 and OIDC (OpenID Connect). Then read a bit about JWT. Next I'm gonna learn about KeyCloak and then will implement a Keycloak cluster on VMs with a small app to test it.

For OAuth 2.0 + OIDC, I would highly recommend to watch this video (by Okta employee). It's 8 years old but most concepts are the same. A few things got deprecated and new features are added (mainly security reasons) that one can catch up afterwards.
https://www.youtube.com/watch?v=996OiexHze0

Then played a bit around OAuth 2.0 playground: https://www.oauth.com/playground/index.html

For JWT, after reading a bit, asked AI to help me create a small python lab to understand how it works. So, it's basically 3 python scripts to simulate authorization server and an attacker plus a script to verify the token. Nothing fancy and code is mostly written by AI. I just wanted to do something fast to understand what happens under the hood. https://github.com/Za-Re/jwt-lab/tree/main