Migrating from Keycloak
Most of a Keycloak realm maps directly:
| Keycloak | Nod |
|---|---|
| Realm | Realm (nod realm create) |
| Client (confidential, public) | Client (--confidential, or public) |
| Client with service accounts enabled | Machine client (--machine) |
| Client scopes and audiences | APIs (nod api register) and their scopes; resource (RFC 8707) names the API |
| Realm roles | Roles (nod role create) |
| Groups | Organizations, or roles (see Organizations) |
| Identity providers (OIDC, SAML, GitHub) | Connections (nod connection add, add-saml, --github) |
| User federation (LDAP, Active Directory) | LDAP connections (nod connection add-ldap) |
| Users | Users (nod import keycloak) |
| Authorization services | Nod FGA (OpenFGA's modeling language) |
| Themes | Branding and your own wording per language (Sign-in methods) |
Users, with their passwords
- Export the realm with its users. From the admin console's Realm settings → Action → Partial export the users aren't included; use the server's export instead:
sh kc.sh export --realm corp --users realm_file --file corp-realm.json
(--users different_files writes corp-users-0.json and so on; each is imported the same way.)
- Allow passwords in the realm, then import:
nod realm set acme --passwords on
nod import keycloak acme corp-realm.json
# 830 imported (811 with their password), 0 already here, 1 failed
What happens to each user:
- They keep their password. Keycloak's hashes come across as they are: Argon2 (Keycloak's default since version 24) stays Argon2; PBKDF2 (SHA-1, SHA-256 or SHA-512, the default before) is checked as Keycloak checked it and replaced with Argon2id the first time they sign in. Both credential layouts are read: the JSON-in-a-string one (
secretData,credentialData, Keycloak 12 and later) and the older plain fields. - Their username, email (verified or not), first and last name come across; a disabled user arrives blocked.
- Importing again finds them (they're linked to their Keycloak id) and changes nothing, so an import can be re-run after fixing a failed record.
- Not imported: service-account users (make a machine client instead), credentials Nod can't read (each such user is refused whole, with its record number), OTP secrets (people set up their authenticator app again), and WebAuthn credentials (bound to Keycloak's origin; people add a passkey here).
Apps
Keep each app's client id when you register it in Nod, and point the app at the new issuer (https://auth.example.com/acme). Standard OpenID Connect libraries need no other change: the code flow with PKCE, refresh tokens, userinfo, logout (RP-initiated and back-channel) and client credentials work as before. Nod always requires PKCE for public clients and S256 only.