Change and extend keycloak Admin UI
Asked Answered
D

1

6

There are lot of resources on how to create templates for the welcome screen, login and email etc but so far I have not been able to find anything how can I customize and extend the admin client itself.

What I want to do is:

Create some custom entities in keycloak database, and be able to view and edit them directly in the keycloak admin UI

From the code that comes with keycloak, it seems that they have used angular to create the admin UI, but it looks like the production version of the angular app. Are there any resources where I can get access to the dev version of the app, so can play around and build custom view and fields in the admin UI?

I believe once I have access to that, I can find my way through to how to access the data from my custom entities, but any pointers to that would also be great!

PS: I have read the docs and have been successful in creating custom entities in keycloak, it's just the admin UI part where I do not see any available resources.

Thanks!

Digamy answered 22/5, 2020 at 21:14 Comment(3)
I came here with the same kind of question, apparently nearly at the same time. I'll post here if I find more information.Entertaining
@JessB I found a sample project, which I am currently investigating. It does not provide much info, but I am digging inside to see what is possible and what. Maybe this will help you too in some manner. Here is the github repoDigamy
thanks so much, I'll take a look.Entertaining
D
0

After researching alot and trying out various approaches, I have come to the following conclusion:

The best option to extend Keycloak for extra functionality is to not extend it at all.

When using Keycloak it serves a specific purpose. I have learned it that hard way, it is better to implement a microservice/module (whatever you wanna call it) that extends Keycloak functionality by leveraging its Admin APIs.

By doing this, we can add whatever extra functions we want, eg. user Profile Image, custom user profile pages, custom admin pages, etc using the products UI theme without messing around with Keycloak.

Advantages are:

  1. Easier to update Keycloak
  2. Can allow fine tuned access to Users to their profiles and data
  3. Can allow fine tuned access to admins without exposing everything Keycloak offers, which might be overwhelming to certain admins.
  4. Admin APIs are relatively stable and often do not introduce breaking changes

This ofcourse does not work if you want a specific claim added directly to the JWT token, based on the extension.

For this reason, I would recommend having a look at the following github project. I used this generate and achieve what I wanted.

Digamy answered 7/2, 2022 at 11:0 Comment(1)
github.com/keycloak/keycloak/discussions/19508 Only now has there been development from Keycloak themselves that they are implementing something. I suggest following this discussion until something is published on their website.Synecology

© 2022 - 2024 — McMap. All rights reserved.