OfficialSPIPolicy / AuthorizationActive
keycloak-restrict-client-auth
sventorben/keycloak-restrict-client-auth ↗
Restrict which users may access which clients (role/policy based).クライアント単位でユーザーのアクセスを制限
- ★
- 440
- Forks
- 35
- Contributors
- 7
- Updated
- 2026-10-14
- KC
- 26.8.0
- License
- MIT
What it can doできること6
- Allow only selected users to log in to a specific client (out-of-the-box Keycloak cannot do this per client).特定クライアントへのログインを、許可したユーザーだけに限定できる(標準のKeycloakではクライアント単位で不可)
- Restrict via a client role named
restricted-access(direct, group or composite assignment) or via authorization policies on aKeycloak Client Resource.クライアントロールrestricted-access(直接・グループ・コンポジット付与)か、認可リソースKeycloak Client Resourceのポリシーで制限 - Check access on every login path via a required action — SSO, IdP redirects and password reset included, regardless of the flow.Required Actionにより、SSO・IdPリダイレクト・パスワードリセットを含むすべてのログイン経路でフローに関係なくチェック
- Check access whenever tokens are issued, including refresh and token exchange, via a client policy executor.クライアントポリシーExecutorで、リフレッシュやトークン交換を含むトークン発行時にもチェック
- Optionally deny access to all clients by default and grant it explicitly.全クライアントをデフォルト拒否にし、明示的に許可する運用も可能
- Optionally reject tokens that would list a restricted client in the audience (
Check audience).制限対象クライアントをaudienceに含むトークンの発行も拒否できる(Check audience)
What it cannot do / limitsできないこと・制約5
- It is not a policy enforcement point — your clients must still validate
aud/azp.ポリシー強制点(PEP)ではない。aud/azpの検証はクライアント側で必須 - The
policyprovider only works for confidential OIDC clients with authorization enabled.ポリシー方式は、認可を有効にしたconfidentialなOIDCクライアントでのみ使える - Errors cannot be shown to users in the direct grant (password) flow — it fails with "Account is not fully set up" unless you add the authenticator there.ダイレクトグラント(パスワード)フローではユーザーにエラーを表示できず、"Account is not fully set up" で失敗する(Authenticatorを追加すれば回避可)
- Client-credentials logins are not checked.クライアントクレデンシャルグラントのログインはチェックしない
- No backports or maintenance for older versions.旧バージョンへのバックポートや保守はしない
Requirements前提条件
- Extension version X.b.c is built against Keycloak X.y.z; use the matching major version.拡張のバージョンX.b.cはKeycloak X.y.z向けにビルド。メジャーバージョンを合わせる
- Installing it enables the required action in all realms — read the upgrade notes first.導入すると全realmでRequired Actionが有効になる。事前にアップグレードノートを確認