DIVYA RAIBAGKAR
DIVYA RAIBAGKAR

Reputation: 15

How is the id generated for USER_ENTITY and USER_ATTRIBUTE table in Keycloak DB?

I am new to the Hibernate, and trying to understand how the Primary Key for USER_ENTITY and USER_ATTRIBUTE is generated. When I run the Keycloak server in DEBUG mode I could see the ID is being passed to the org.keycloak.models.jpa.entities.UserEntity, but I am unable to find out how the ID is being generated? Any lead is highly appreciated!

Thanks

Upvotes: 0

Views: 927

Answers (1)

sventorben
sventorben

Reputation: 1912

Basically it is a random UUID generated in KeycloakModelUtil.generateId(). It is called by the JpaUserProvider.

Upvotes: 1

Related Questions