Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#4,109 8 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, spring

Hướng nghiên cứu

Bắt đầu bằng cách truy vết cách các plugin Servlet và Spring MVC lấy Principal đã được xác thực cho các yêu cầu Spring Security OAuth2, rồi so sánh điều này với fallback preferred_username hiện có của Azure SSO. Xác định một claim JWT có thể cấu hình sẽ tác động như thế nào đến user.name hoặc dữ liệu người dùng bổ sung, sau đó kiểm tra kết quả theo schema ECS và các bài kiểm thử tích hợp xác thực liên quan.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
593
Fork
339
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của elastic/apm-agent-java

Tất cả issue của elastic/apm-agent-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.