[keycloak-user] how to clone a realm?

Madhu kkcmadhu at yahoo.com
Thu Jul 5 02:59:46 EDT 2018


 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


More information about the keycloak-user mailing list