OfficialSPIProtocol Mapper / ClaimStale

keycloak-external-claim-mapper

zloom/keycloak-external-claim-mapper ↗

Protocol mapper that adds data from a remote service to the JWT.外部サービスのデータをJWTに追加

★
15
Forks
4
Contributors
3
Updated
2025-07-03
KC
25.0.0
License
Apache-2.0

What it can doできること4

  • Fetch JSON from a remote HTTP endpoint and include it in the user's JWT as a claim.外部HTTPエンドポイントからJSONを取得し、ユーザーのJWTにクレームとして含める
  • Insert the user ID, username or email into the URL and headers via placeholders (**uid**, **uname**, **email**).URLやヘッダーに、プレースホルダ(**uid**、**uname**、**email**)でユーザーID・ユーザー名・メールを埋め込める
  • Reshape the response with a JSONPath expression, and add custom headers.JSONPath式でレスポンスを整形でき、任意のヘッダーも追加できる
  • Optionally send the user's session token as a bearer token to the remote service.ユーザーのセッショントークンをBearerとして外部サービスに送ることもできる

What it cannot do / limitsできないこと・制約3

  • Built and tested only with Keycloak 25.0.0 (other versions need your own build and testing).ビルド・テストはKeycloak 25.0.0のみ(他のバージョンは自分でビルド・検証が必要)
  • With error propagation on, a failed fetch or transform breaks token issuance (HTTP 500).エラー伝播を有効にすると、取得や変換の失敗でトークン発行自体が失敗する(HTTP 500)
  • Uses Keycloak's internal protocol-mapper SPI; last commit in July 2025.Keycloakの内部扱いのProtocol Mapper SPIを使っている。最終コミットは2025年7月

Requirements前提条件