Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

user.name is always UUID when using OIDC and Spring Security

オープン
#4,109 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, spring

調査の方向性

まず、Servlet プラグインと Spring MVC プラグインが Spring Security OAuth2 リクエストに対して認証済みの Principal をどのように取得しているかを追跡し、既存の Azure SSO preferred_username フォールバックと比較します。設定可能な JWT claim が user.name または追加のユーザーデータにどのような影響を与えるべきかを定義し、その結果を ECS スキーマおよび関連する認証統合テストに照らして検証します。

索引モデルが issue の本文から書いたものです。

説明

agent-java community

Is your feature request related to a problem?

When using Spring Security oauth2 authentication to secure an API server, user.name in APM always shows the user ID (as it's the "name" of the Principal).

If a user describes an issue and I go into the APM service view to investigate, I don't typically have their UUID (and neither do they). I do however have their email (login) or preferred username, so I need to recover their UUID manually from Keycloak.

Describe the solution you'd like

I'd like a different claim, in case of JWTs, to be logged instead of or in addition to the UUID. preferred_username is already mentioned in an Azure SSO fallback. Ideally, which claim is used would be configurable. Of course this is only valid for JWTs and similar tokens, which is my use case, so not entirely generic.

This may require going through the Spring MVC plugin instead of the Servlet one?

Describe alternatives you've considered

Using MDC to get additional claims into the transaction data, but it doesn't fit well in the ECS schema and it requires adding code to every backend service.

主要言語
Java
スター
593
フォーク
339
平均マージ
1日 9時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

elastic/apm-agent-java のほかの issue

elastic/apm-agent-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。