8000 Allow overriding storage behavior for Admin UI extensions with `UiTabProviderFactory` and `UiPageProviderFactory` · Issue #28931 · keycloak/keycloak · GitHub 8000
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Allow overriding storage behavior for Admin UI extensions with UiTabProviderFactory and UiPageProviderFactory #28931
Open
@xgp

Description

@xgp

Description

This feature request asks to add support for overriding storage behavior for Admin UI extensions that use UiTabProviderFactory and UiPageProviderFactory.

Currently, the initial version of the Java API for extending the UI uses the org.keycloak.provider.ConfiguredProvider mechanism to allow CRUD of lists of ComponentModels.

It would be helpful to allow extension developers to override the storage behavior so that they could use their own mechanism of exposing and storing the configuration.

Discussion

#24805

Motivation

As discussed here, many existing extension authors have already created their own storage mechanism (e.g. using JPA entities, calling a remote API, etc.), using something other than ComponentModel instances to store their configuration.

The motivation for this can be:

  1. They have a complex model that cannot easily be recreated in ComponentModel
  2. Their extension use case requires them to load their entities/configuration by something other than the full list, ID, or type, which is the current restriction of components.
  3. They simply didn't know it was an option, and now have a mature extension that uses something else.
  4. It is unreasonable to believe that an extension author will significantly modify their extension storage layer in order to introduce a bad design/hack of duplicate configuration.

Details

Suggested implementation

  1. Create an interface that can be implemented along with UiTabProviderFactory and UiPageProviderFactory. E.g.
public interface ComponentStorageFactory {
    Stream<ComponentModel> getComponentsStream();
    ComponentModel getComponent(String id);
    void create(ComponentModel component);
    void update(ComponentModel component);
    void remove(ComponentModel component);
}
  1. Update ComponentResource to change behavior if the type of component has implemented ComponentStorageFactory

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0