OfficialSPIMulti-tenancy / OrganizationActive
keycloak-orgs
Organizations / multi-tenancy for Keycloak realms.Keycloakの組織・マルチテナント機能
License changed from AGPL-3.0 to Elastic License v2 (check before adopting).
- ★
- 544
- Forks
- 100
- Contributors
- 38
- Updated
- 2026-10-14
- KC
- 26.8.0
- License
- Elastic-2.0
What it can doできること5
- Model tenants as first-class Organizations inside a single realm, with memberships (a user can join several), organization-specific roles, invitations and email domains.1つのrealm内でテナントをOrganizationとして扱える。メンバーシップ(複数所属可)、組織固有ロール、招待、メールドメインを持つ
- Manage organizations, memberships, roles (including bulk) and organization IdPs through custom REST APIs (OpenAPI documented) and an Admin UI theme.組織・メンバーシップ・ロール(一括操作含む)・組織IdPを独自REST API(OpenAPIあり)と管理UIテーマで管理
- Let organization admins manage their own IdP; users are routed to it by email domain (Home IdP Discovery), and domain ownership can be verified via DNS.組織管理者が自組織のIdPを管理でき、メールドメインでそのIdPへ振り分け(Home IdP Discovery)。ドメイン所有はDNSで検証可能
- Invite users (existing or not) with an emailed link; a required action / authenticator lets them accept or reject at login.既存・未登録のユーザーをメールで招待でき、ログイン時にRequired Action/Authenticatorで承諾・拒否させる
- Add organization attributes or memberships and roles to tokens via OIDC mappers; emit organization events; import/export organizations; experimental SCIM.OIDCマッパーで組織属性や所属・ロールをトークンに追加。組織イベントの発行、組織のインポート/エクスポート、実験的なSCIMにも対応
What it cannot do / limitsできないこと・制約6
- Licensed under the Elastic License v2 (changed from AGPL v3) — not an OSI open-source license; check the terms before commercial use.ライセンスはElastic License v2(AGPL v3から変更)で、OSI準拠のOSSライセンスではない。商用利用前に条件を確認
- Does not work with the stock Keycloak image as-is — it needs extra libraries and
keycloak-admin-clientat Keycloak build time, so the Phase Two image is recommended.標準のKeycloakイメージにそのまま入れても動かない。追加ライブラリと、Keycloakビルド時のkeycloak-admin-clientが必要(Phase Two版イメージ推奨) - Only guaranteed with the Keycloak version packaged in the Phase Two image.動作保証はPhase Twoイメージに同梱のKeycloakバージョンのみ
- Officially supports CockroachDB, PostgreSQL and MySQL; other databases may fail.公式サポートDBはCockroachDB、PostgreSQL、MySQL。それ以外は失敗する可能性がある
- Separate from Keycloak's built-in Organizations feature (the Phase Two image turns the native one off).Keycloak標準のOrganizations機能とは別物(Phase Twoのイメージでは標準機能を無効化)
- Creating an invitation sends no email unless
send=true; theSet user in contextdefault of IdP discovery leaks account existence when followed by a Username Password Form.招待はsend=trueを付けないとメールが送られない。IdP DiscoveryのSet user in contextはデフォルトのままUsername Password Formと組み合わせると、アカウントの存在が漏れる
Requirements前提条件
- Run the DB migrations on first start (new tables plus
view-organizations/manage-organizationsroles in every realm).初回起動時にDBマイグレーションが走る(新規テーブルと、全realmへのview-organizations/manage-organizationsロールの追加) - Select the
phasetwo.v2admin theme to show the Organizations UI (set it on the realm you log in to, e.g. master).組織UIを出すには管理テーマphasetwo.v2を選択(ログインするrealm、たとえばmaster側に設定)