KELIXO DO
KELIXO DO

Reputation: 35

Is it possible to customize user_entity table used by keycloak?

I'm trying to use keyClaok for SSO. I set up mysql instead of embedded h2 database in keycloak.

However, there is a problem. On udemy lecture, lecturer told that it's not recommanded to handle db- table(created by keycloak) directly.

If business needs application handles user's several attributes (like modifying user's deparment, position, age, profile_img) , how to develop this needs with database in keycloak?

If i choose to use keycloak, should i consider that database (which application use) and the other database (which keycloak use) are apart? which means USER-DOMAIN is isolated from other domain

Upvotes: 3

Views: 4994

Answers (1)

zaerymoghaddam
zaerymoghaddam

Reputation: 3127

You have two options. If the amount of data is not considerable and have a simple name=value structure, you can just use the user attribute in Keycloak. It's like a map of data attached to each user. The other solution is to keep the data in your own repository and implement a custom UserStorageProvider that queries your database to fetch users (including extra properties). Keycloak documentation already has an example of this provider.

Upvotes: 2

Related Questions