[keycloak-user] Deployment of custom IdentityProviders with HTML pages for admin console

Thomas Darimont thomas.darimont at googlemail.com
Fri Aug 3 08:04:11 EDT 2018


Hi Dmitry,

Yes, I'm currently "patching" the Keycloak theme, but only by /adding/ HTML
files for my IdP which are dynamically
resolved by the Keycloak admin-console.
Sure, I could create a custom theme derived from the Keycloak base theme
which contains just my additional IdP
HTML files, but then I'd need to configure the theme for every realm where
I need my IdP.

I agree with you that patching the Keycloak theme by changing files is not
a good idea, but adding files required
for an extension like a custom IdP or an authenticator should IMHO be a
supported use case.
Extensions should IMHO allow declaring embedded resources
(templates/css/js/images) which should be resolved by Keycloak,
similar to how themes work.

Cheers,
Thomas

On Thu, Aug 2, 2018 at 2:06 AM Dmitry Telegin <dt at acutus.pro> wrote:

> Hi Thomas,
>
> (skipped)
>
> > My current deployment script contains the following:
> > ...
> >   echo install new acme-identityprovider
> >   cp target/*.jar $KEYCLOAK_HOME/standalone/deployments
> >
> >   echo install new theme page
> >   cp -r src/main/resources/themes/* $KEYCLOAK_HOME/themes
> > ...
> >
> > This copies the associated HTML files to
> >   themes/base/admin/resources/partials/realm-identity-provider-acme.html
> >
> themes/base/admin/resources/partials/realm-identity-provider-acme-ext.html
>
> So you are actually patching Keycloak base theme? You're a cheater! :-D
> This is not how GUI modifications are done in Keycloak normally.
>
> If you're on KC 4.0.0+, seems like Theme Resources is what you're looking
> for:
>
> https://www.keycloak.org/docs/latest/server_development/index.html#_theme_resource
>
> Otherwise, the recommended way is to create a custom theme, inherit it
> from Keycloak stock theme and extend it with your content. You can put your
> theme into the same JAR to have it hot deployed (see KEYCLOAK-4547), but
> also only if you're on KC 4.0.0+.
>
> Cheers,
> Dmitry Telegin
> CTO, Acutus s.r.o.
> Keycloak Consulting and Training
>
> Pod lipami street 339/52, 130 00 Prague 3, Czech Republic
> +42 (022) 888-30-71
> E-mail: info at acutus.pro
>
> >
> > Cheers,
> > Thomas
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>


More information about the keycloak-user mailing list