OfficialSPIMulti-tenancy / OrganizationActive
keycloak-multi-tenancy
anarsultanov/keycloak-multi-tenancy ↗
Multi-tenancy support for Keycloak.Keycloakのマルチテナント対応
- ★
- 171
- Forks
- 27
- Contributors
- 6
- Updated
- 2025-12-12
- KC
- 26.3.1
- License
- Apache-2.0
What it can doできること5
- Build B2B multi-tenant IAM in one realm — users create a tenant at registration, review invitations and pick an active tenant at login (required actions).1つのrealmでB2B向けマルチテナントIAMを構築できる。登録時のテナント作成、招待の確認、ログイン時のアクティブテナント選択をRequired Actionで行う
- Switch the active tenant without re-login via Application-Initiated Actions (with cancel support).Application-Initiated Actionで、再ログインせずにアクティブテナントを切り替えられる(キャンセルも可)
- Manage tenants, multi-valued searchable attributes and invitations through a REST API (tenant creator becomes
tenant-admin; optional realm-widemanage-tenants).テナント、検索可能な多値属性、招待をREST APIで管理(作成者はtenant-admin。realm全体の管理用にmanage-tenantsロールも設定可能) - Put the active tenant, all tenants or specific tenant attributes into tokens via mappers.マッパーで、アクティブテナント・全所属テナント・特定のテナント属性をトークンに追加
- Bind IdPs to specific tenants, auto-create memberships on IdP login, and offer a "Login with SSO" option where users type an IdP alias.IdPを特定テナントに紐づけ、IdPログイン時に所属を自動作成できる。IdPエイリアスを入力する「Login with SSO」も提供
What it cannot do / limitsできないこと・制約4
- Tenant-specific IdPs are configured through the Keycloak REST API (
multi-tenancy.tenantsattribute), not a dedicated UI.テナント専用IdPの設定はKeycloakのREST API(multi-tenancy.tenants属性)で行う必要があり、専用のUIはない - Users logging in through a tenant-specific IdP who are not members of its tenants get an error unless automatic membership is set up.テナント専用IdPでログインしたユーザーがそのテナントのメンバーでない場合、所属の自動作成を設定していないとエラーになる
- Invitations are only visible to users with a verified email.招待はメール確認済みのユーザーにしか表示されない
- Only the most recent Keycloak is targeted (the extension's major version matches Keycloak's).対象は最新のKeycloakのみ(拡張のメジャーバージョンがKeycloakと対応)
Requirements前提条件
- Copy the JAR to
providers/, runkc.sh build, enable the three required actions in this exact order and turn onVerify email.JARをproviders/に置いてkc.sh build。3つのRequired Actionをこの順で有効化し、Verify emailをオンにする