Dynamically set the schema used within Keycloak UserStorage SPI

26 views
Skip to first unread message

Matthias

unread,
Sep 22, 2023, 3:28:23 AMSep 22
to Keycloak User

I am implementing a custom user storage provider which gets the user data from an external PostgreSQL database. Since I have several schemas I want to create 2 instances of that provider where I am using the schema name to query the database.

I am about to use this example which is using quarkus and JPA(Hibernate) to encapsulate the database access.

How can I set the schema (within UserEntity?) programmatically to achieve that?
Also there is a persistence.xml in this example can I get rid of this and only use the quarkus.properties file or is it needed (by the underlaying server)?

 Thanks and Best Regards

Matt

Reply all
Reply to author
Forward
0 new messages