OfficialSPIEvent / Webhook / MessagingActive
keycloak-events
Event listeners and webhooks for Keycloak events.Keycloakイベント用のリスナー/Webhook
A COPYING file exists; license type not confirmed.
- ★
- 317
- Forks
- 53
- Contributors
- 13
- Updated
- 2026-10-15
- KC
- 26.8.0
- License
- Other (see repo)
What it can doできること6
- Subscribe to events with webhooks managed through a REST API — select event types, retry with exponential backoff, and send after the transaction commits.REST APIで管理するWebhookでイベントを購読できる。イベント種別の指定、指数バックオフでの再送、トランザクションのコミット後の送信に対応
- Authenticate webhook payloads with an HMAC signature or a bearer JWT signed by the realm key (no shared secret needed).Webhookのペイロードを、HMAC署名か、realmの鍵で署名したBearer JWT(共有シークレット不要)で認証できる
- Send events to an HTTP endpoint with optional HMAC signing and retries.イベントをHTTPエンドポイントへ送信できる(HMAC署名と再送は任意)
- Run JavaScript event listeners (like the script authenticator) configured per realm.realmごとに設定したJavaScriptのイベントリスナーを実行できる(スクリプトAuthenticatorと同じ方式)
- Run several instances of the same listener type with different configs, configured at runtime through realm attributes (REST endpoint included).同じ種類のリスナーを設定違いで複数動かせる。設定はrealm属性で実行時に変更でき、REST APIもある
- Emit every event as a structured log with MDC fields for Loki/Elasticsearch/CloudWatch; base classes for "user added / removed" listeners are included.全イベントをMDC付きの構造化ログとして出力(Loki/Elasticsearch/CloudWatch向け)。「ユーザー追加/削除」リスナーの基底クラスもある
What it cannot do / limitsできないこと・制約6
- Licensed under the Elastic License 2.0 — not an OSI open-source license; check the terms before commercial use.ライセンスはElastic License 2.0で、OSI準拠のOSSライセンスではない。商用利用前に条件を確認
- Only the most recent Keycloak version in
pom.xmlis supported.サポートはpom.xmlに記載の最新Keycloakバージョンのみ - The stock Admin UI cannot edit the realm attributes used for configuration — use the API, the database or the Phase Two admin theme.設定に使うrealm属性は標準の管理UIでは編集できない(API、DB直接、またはPhase Twoの管理テーマを使う)
- Configuration values support only single-depth JSON objects.設定値のJSONは1階層のオブジェクトのみ対応
- The user-change listener is untested with users added via identity providers or federation.ユーザー変更リスナーは、IdPやフェデレーション経由で追加されたユーザーでは未検証
- For bearer-JWT webhooks, set the realm frontend URL or
KC_HOSTNAME, otherwise the issuer may not match production tokens.Bearer JWTのWebhookでは、realmのフロントエンドURLかKC_HOSTNAMEを設定しないと、issuerが本番のトークンと一致しない場合がある
Requirements前提条件
- Put the fat JAR in
providersand rebuild, then enable listeners such asext-event-webhookin Realm Settings > Events.fat JARをprovidersに置いて再ビルドし、Realm設定 > Eventsでext-event-webhookなどのリスナーを有効化 - Managing webhooks needs the
view-eventsandmanage-eventspermissions.Webhookの管理にはview-eventsとmanage-eventsの権限が必要