[keycloak-user] custom cache

Sud Ramasamy to_sud at yahoo.com
Mon Nov 26 13:50:10 EST 2018


Hi,

We’ve developed a custom authenticator that we’ve been able o plugin into Keycloak to handle a custom authentication mechanism. The authenticator has some state that needs to be available across the cluster. We could store the state in the database and thereby make it available to other nodes in the cluster. But this seems a little heavy weight.

Instead we were hoping to be able to use the Infinispan capabilities in the Keycloak/Wildfly distribution to cache and distribute the state to nodes in the cluster. Is this possible without forking the Keycloak codebase? We noticed that the Keycloak infinispan model module provides the existing caching mechanism for the User, Realm and Session cache. Was wondering if there is a way to possibly plugin our own infinispan Cache Provider for our custom object and thereby use this cache in our custom authenticator in a similar way that the User, Realm and Session caches are used.

Or what our alternatives might we have.

Thanks in advance.
-sud


More information about the keycloak-user mailing list