[keycloak-user] how to clone a realm?

Dmitry Telegin dt at acutus.pro
Thu Jul 5 05:06:08 EDT 2018


Hi Madhu,
I would (as usual) suggest creating Keycloak extension for that, like
custom REST endpoint with optional GUI extensions. From my experience,
I'd say it shouldn't be that hard. You will get rid of the roundabout
with importing-exporting data (which will become extremely painful as
the data volume grows); additionally, you'll be able to precisely
control the data you'll be copying.
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

>  Hi,
> I am using keycloak for a multi tenant/multi realm scenario.
> In all my realms the clients/roles/password
> policies/groups/authentication/token settings etc are same.
> So my idea is to create a template realm and clone it to a new realm
> every time i want to provision a new tenant.
> I tried using the import/export option, but was not successful. I
> even tried remvoign all the ids /container id fields from the
> exported json and changed the realm namesand was unsuccessful again.
> Any idea how to clone a realm?
> Looks like import/export was built for replicating/duplicating the
> data in another keycloak/database instance, and not suitable for
> cloning /creating a new realm.
> Any idea how i can create a new realm with defined set of clients,
> user policies, mappers, authentication settings, flows, token
> settings and roles?
> Regards,Madhu
> _______________________________________________
> 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