Thank you for taking the time to respond. Let me see if I can outline steps to reproduce:
- Run a DB and Keycloak container:
docker run --name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=password -e POSTGRES_ROOT_PASSWORD=root_password -d postgres
docker run --rm --name keycloak --link postgres:postgres -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=changeme jboss/keycloak-postgres
- Log in to admin web UI and make both a client and a LDAP user federation provider.
- Ctrl+C to stop the keycloak container
- Start a container connected to the same database for export:
mkdir /opt/keycloak_export
chmod 0777 /opt/keycloak_export
docker run --rm --name keycloak_exporter --link postgres:postgres -v /opt/keycloak_export:/opt/jboss/export jboss/keycloak-postgres -Dkeycloak.migration.action=export -Dkeycloak.migration.provider=dir -Dkeycloak.migration.dir=/opt/jboss/export
- Ctrl+C to stop the keycloak_exporter container.
- Copy the realm export at /opt/keycloak_export/master-realm.json to your workstation. The export should contain a populated userFederationProviders key:
jq '.userFederationProviders' /opt/keycloak_export/master-realm.json
- Destroy the DB and start from a blank slate:
docker rm -f postgres
docker run --name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=password -e POSTGRES_ROOT_PASSWORD=root_password -d postgres
docker run --rm --name keycloak --link postgres:postgres -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=changeme jboss/keycloak-postgres
- Log in to admin web UI and import the contents of master-realm.json
- Result: the client is imported but the LDAP user federation provider is not.
Is the import supposed to also pick up the user federation provider?
Thanks,
-John Bartko