Sitemap

Keycloak Custom SPI and Database Extensions: Adding Your Own Tables 1/2

8 min readSep 8, 2025

In this story, we’ll move beyond the basics and dive deep into the advanced world of extending Keycloak.

Press enter or click to view image in full size

If you are not a Medium member, then click here to read for free.

· Prerequisites
· Overview
· Understanding Keycloak SPIs
What is an SPI?
Why Use an SPI Instead of Custom Code?
SPIs for Database Extensions
· Let’s code
Use Case Example: Subscriptions
Project Setup
Creating a Custom Entity (New Table)
Integrating Liquibase for Database Migration
Registering the Entity with Keycloak
· Deploying the Custom SPI (Provider + Factory) in Keycloak
Build the JAR
Copy the JAR into Keycloak
Verifying Deployment in the Logs
· Conclusion
· Additional Readings
· References

Prerequisites

--

--

No responses yet