Aller au contenu

export

Ce contenu n’est pas encore disponible dans votre langue.

Runs a source connector and writes users.cmf.jsonl.gz, manifest.json, and a scaffolded mapping.yaml to the output directory. Three sources are supported: flatfile, a generic CSV/JSON file using a recognized column convention (source_id, email, given_name, family_name, username, locale, blocked, password, password_algorithm); kratos, which streams every identity out of a running Ory Kratos instance via its Admin API, including its bcrypt/argon2id password hash; and keycloak, which reads a kc.sh export realm file or directory (the Admin API never returns password hashes, so a live-instance export isn’t possible). Any other flat-file column, or Keycloak attribute, is passed through as app_metadata/user_metadata and flagged as a manual mapping step rather than silently dropped.

For what a Kratos export includes and leaves out, see Export users from Ory Kratos. For Keycloak, see Export users from Keycloak.

Terminal window
iamigrate export --source flatfile --in users.csv --format csv --out ./export/
# or, from a running Kratos instance
KRATOS_ADMIN_URL=http://127.0.0.1:4434 iamigrate export --source kratos --out ./export/
# or, from a `kc.sh export` realm export
iamigrate export --source keycloak --in ./realm-export/ --out ./export/
FlagDescription
--sourceSource connector name: flatfile | kratos | keycloak (required)
--inInput file path (flatfile source), or kc.sh export realm file or directory (keycloak source)
--formatInput format: csv | json (default csv, flatfile source)
--outOutput directory (default ./export/)
--admin-urlKratos Admin API base URL (or $KRATOS_ADMIN_URL, kratos source)
FileContents
users.cmf.jsonl.gzThe CMF records
manifest.jsonRecord counts, per-algorithm hash counts, skipped records
mapping.yamlScaffolded field mapping; empty for the recognized-column simple case, with manual_steps flagged for any custom app_metadata