Professional Documents
Culture Documents
For these types of situations, Keycloak allows you to augment your external store by storing
extra information in Keycloak’s database. This is called federated user storage and is
encapsulated within
the org.keycloak.storage.federated.UserFederatedStorageProvider class
.
UserFederatedStorageProvider
package org.keycloak.storage.federated;
...
The UserFederatedStorageProvider instance is available on
the KeycloakSession.userFederatedStorage() method. It has all different kinds of
methods for storing attributes, group and role mappings, different credential types, and required
actions. If your external store’s datamodel cannot support the full Keycloak feature set, then
this service can fill in the gaps.
Augmentation Example
In our PropertyFileUserStorageProvider example, we just need a simple change to
our provider to use the AbstractUserAdapterFederatedStorage.
PropertyFileUserStorageProvider