Migrate from Self-Hosted OIDC to Lurus Auth
The enterprise already runs an IdP (Keycloak / Auth0 / Okta / Azure AD) and wants employees to keep signing in with their corporate accounts while outsourcing the identity layer to Lurus.
Two Strategies
You manage only the user lifecycle in your corporate IdP; Lurus products read identities through OIDC federation.
Export your existing Keycloak/Auth0 to Lurus Auth (Casdoor) via SCIM and make it the single source of truth.
Strategy A — Federation Topology
graph LR
IDP[Existing Enterprise IdP] -->|OIDC Federation| LA[Lurus Auth]
LA --> P[All Lurus Products]Strategy B — Relocation Topology
graph LR
KC[Original Keycloak/Auth0] -->|SCIM Export| LA[Lurus Auth · Casdoor]
LA --> D[All Downstream]Strategy A Steps (Recommended)
Create a federation connection in the Lurus console — Go to
identity.lurus.cn→ Enterprise Settings → Identity Providers → New → choose OIDC. Enter your corporate IdP's:- Issuer URL
- Client ID
- Client Secret
- Callback URL (provided by Lurus)
Claim mapping — Map your corporate IdP's attributes to Lurus users.
yaml# 将企业 IdP 的属性映射到 Lurus 用户 email: email display: name department: department # custom claimPhased rollout — In your corporate IdP, first allow 5% of employees to use the Lurus sign-in button. Verify for 1 week → roll out to everyone.
Strategy B Steps
Export SCIM — Export users from Keycloak as JSON:
bash./kcadm.sh get users -r myrealm --fields username,email,firstName,lastName -f json > users.jsonBatch import into Lurus
POST/admin/v1/scim/users:batchImportBatch import users (identity.lurus.cn)bashcurl -X POST https://identity.lurus.cn/admin/v1/scim/users:batchImport \ -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d @users.jsonPassword policy — By default Lurus does not migrate passwords (incompatible hashes); the first login forces a "forgot password" flow. If you use SSO federation, no password migration is needed.
Benefits of SSO Federation
The account lifecycle stays entirely within the enterprise.
Deactivate in the corporate IdP → Lurus access is revoked immediately.
Sign-in logs live in the corporate IdP.
Your existing MFA policies remain in effect.
FAQ
Will sessions conflict?
Lurus uses its own session cookie and does not affect your original system.
Can PAT / JWT be kept?
Yes — API-level tokens are unaffected by the SSO migration.
How do I export audit logs?
All identity events can be batch-exported through the endpoint below:
/admin/v1/audit:exportBatch export identity events