[BUG] Agent card declares no security scheme although every A2A call needs a bearer token

Đang mở
#3,788 0 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api, authentication

Hướng nghiên cứu

Start at gateway.go L171-173 where the agent card is assembled, then read http.go L37 and http_test.go L357 to see how the well-known route is authenticated. Read A2A spec §7.3 and §3.1.11 before editing, since the issue leaves open whether to declare the scheme on the authenticated card or serve a minimal unauthenticated one. Done when securitySchemes/securityRequirements are populated and the gateway tests pass; wait for a maintainer to pick the option first.

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

Mô tả

📋 Prerequisites
  • I have searched the existing issues to avoid creating a duplicate
  • By submitting this issue, you agree to follow our Code of Conduct
  • I am using the latest version of the software (checked against main at e8cd153)
  • I have tried to clear cache/cookies or used incognito mode (if ui-related)
  • I can consistently reproduce this issue
🎯 Affected Service(s)

Controller (A2A gateway)

🚦 Impact/Severity

Minor

🐛 Bug Description

The agent card declares no security schemes or requirements (gateway.go L171-173), while every A2A operation, the card included, requires a bearer token. A generic client therefore cannot discover how to authenticate (§7.3). The card also sets extendedAgentCard: true, and §3.1.11 requires the extended card to be fetched with one of the schemes declared in the public card's securitySchemes, which cannot hold when none are declared.

🔄 Steps To Reproduce
  1. Fetch /agents/<namespace>/<name>/.well-known/agent-card.json with a valid token.
  2. Inspect securitySchemes and securityRequirements.
🤔 Expected Behavior

The card declares the scheme the gateway enforces, for example an openIdConnectSecurityScheme pointing at the configured issuer's discovery document, or an HTTP bearer scheme, with a matching requirement.

📱 Actual Behavior

Both are empty.

🔍 Additional Context

The well-known card route serves the extended card and returns 401 without a token (http.go L37, http_test.go L357). Filling securitySchemes alone helps a client that already has a token, but not one that is trying to find out how to get one. Two options:

  • declare the scheme on the card and keep the card behind authentication;
  • serve a minimal public card without authentication (interfaces and security schemes only) and keep the full card at GetExtendedAgentCard, as §3.1.11 describes.

The second option means an unauthenticated caller learns that an Agent exists, which matters for #3787. Which one is preferred?

Note: §3.1.11 and §13 call the requirements field AgentCard.security; the a2a-go v2 type names it SecurityRequirements.

Ngôn ngữ chính
Go
Star
4.5k
Fork
937
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
150

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 kagent-dev/kagent

Tất cả issue của kagent-dev/kagent

Issue tương tự

Thêm issue về Go

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.