[keycloak-user] Not able to extend User Storage SPI without changing Keycloak configuration files

Jan Lieskovsky jlieskov at redhat.com
Fri Aug 23 06:54:57 EDT 2019


Hey David,

On Thu, Aug 22, 2019 at 2:15 PM David VS <david.vsaraiva at gmail.com> wrote:

> Goal:
> Setup custom federation which extends ldap provider.
>
> Question: What is the proper way to extend the ldap federation while adding
> one more configuration input? (without changing internal keycloak files)
>
> I followed the steps in
>
> https://www.keycloak.org/docs/latest/server_development/index.html#_user-storage-spi
> and specify my own provider and providerFactory,
>
> In admin console, when trying to create the federation "custom-ldap", most
> of the input fields do not have a label and some buttons like "Test
> connection" are missing. The configuration property that I added and
> customized has label/default value/tooltip.
>

Hard to say without looking at the specific code, trying to implement this.

But I would assume, those fields aren't available because the custom
federation
LDAP provider doesn't implement the underlying interface methods, that
are actually responsible for performing the action, when particular button
is clicked?

What happens, if you override the specific methods from the default LDAP
provider, responsible for accessing these fields, and point them back
to the default implementation (e.g. by calling super() with the same args /
params within the overridden interface method)?


>
> If it is not possible to extend the form, is there an easy way how to
> inherit the same UI form from the ldap federation page in my extension?
>

Is the issue, that you can't see the fields, newly introduced by your
custom LDAP
federation provider, or that some fields from the default screen aren't
accessible /
usable upon the implementation of that a provider? Or both?


>
> (Im new to keycloak, and do not have experience with Freemarker).
>
> Thank you so much for your support,
>
> David
>
>
Regards, Jan


More information about the keycloak-user mailing list