Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#4,109 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, spring

Direzione di ricerca

Inizia tracciando il modo in cui i plugin Servlet e Spring MVC ottengono il Principal autenticato per le richieste Spring Security OAuth2 e confrontalo con il fallback preferred_username esistente di Azure SSO. Definisci in che modo un claim JWT configurabile dovrebbe influire su user.name o su dati utente aggiuntivi, quindi verifica il risultato rispetto allo schema ECS e ai test di integrazione dell’autenticazione pertinenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Java
Stelle
593
Fork
339
Merge medio
1g 9h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di elastic/apm-agent-java

Tutte le issue di elastic/apm-agent-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.