[keycloak-user] Keycloak JPA UserFederation Adapter in multiple realms with different Datasource names

Marek Posolda mposolda at redhat.com
Fri Feb 9 09:18:39 EST 2018


I suggest to look at this example: 
https://github.com/keycloak/keycloak/tree/master/examples/providers/user-storage-jpa

AFAIK It's probably closest thing to your usecase, which we have.

Marek

Dne 8.2.2018 v 17:49 Niels Bertram napsal(a):
> Hi there,
>
> we have a requirement to set the jndi datasource name on a UserFederation
> provider when added to a realm to support connecting different realms in
> the same Keycloak server to different databases. Been through the examples
> and read a few emails from around 2016 in the developer list but do not
> find anyone who'd actually done this before. we could create a user managed
> EntityManagerFactory within the federation provider factory but the
> question is then how can we inject it into the container context and enlist
> our transactions in the JTA?
>
> Has anyone ever had to implement something like that?
>
> Cheers,
> NIels
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list