Repository navigation
How do you manage realm data for import to other systems? #13705
Unanswered
swright-eti
asked this question in
Q&A
Replies: 1 comment 2 replies
|
For the password issue I think you could try exporting and importing part of the database, but it should be much easier to delegate user credentials and other data to a dedicated service like LDAP or Active Directory. Throughout the cycle, depending on your needs, you can give Keycloak read-only or read-write access to the user database (depending on where user passwords should be updated from - internally by Keycloak, or externally). |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We are struggling with managing the realm data. Its likely that our approach is wrong so any comments or help would be appreciated.
Requirement: We need to be able to take all data from one Keycloak instance and import it to another instance.
We have a keycloak instance running in a development environment. The intention is that roles are modified or added as features in the application development cycle demand. Once the work is completed we want to be able to export all the data, and then import it into a keycloak instance running in a QA environment. QA can then validate that all the roles work as expected with the apps. Once that is completed we want to export the data and store it in a repository. It will then be used when we install our application suite at a customer site.
The situation is further complicated by the fact that our applications support multi-tenancy. We have two types of tenants that we call OSS, and Customer Care. We represent that in keycloak by having a realm per tenant. Each client is repeated in each tenant, but the roles are different. To make it even more complicated our customers have different combinations of the tenant types. For example one customer may only have an OSS tenant, while another may have two OSS tenants and one Customer Care tenants.
We have solved this problem by writing some scripts that export the keycloak data. We end up with two template configurations, one for OSS and one for Customer Care. When we import that data we use a configuration file to tell the importer how many OSS realms to make from from the OSS configuration, and how many Customer Care realms to make from the Customer Care configuration. The importer then uses the keycloak API to do the work.
This all works reasonably well except for the password. We understand that passwords cannot be exported through the APIs. The result though is that passwords for all users is empty. We considered setting the "update password" flag for all users when we do the import. However that wont work because the user first has to enter their password before keycloak will tell them to update their password. Since there is no password, its not possible to do this.
We have considered setting dummy passwords and then telling users to update their passwords on first login, or setting the password to be temporary. But that seems like a security problem.
There has to be some simple way to manage this, I just cant seem to find it.
All reactions