[Feat]: PushNotificationConfig.authentication is ignored; no Authorization header is sent in push notifications
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- python
- 领域
- api, authentication, backend, security
调研方向
查看 BasePushNotificationSender 类,以了解推送通知是如何分发的。问题在于 PushNotificationConfig 中的身份验证字段被忽略了。检查配置解析和 _dispatch_notification 方法。修复方案是读取身份验证方案,并在现有的 X-A2A-Notification-Token 旁添加适当的 Authorization 标头(例如 Bearer)。检查与推送通知相关的现有测试,以了解预期行为,并为新的身份验证标头添加测试。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
The A2A protocol spec states that when a client provides a PushNotificationConfig with an authentication scheme (e.g. "schemes": ["Bearer"]), the A2A server must authenticate when sending push notifications to the client’s webhook.
Example config:
"configuration": {
"pushNotificationConfig": {
"url": "CALLBACK-URL",
"token": "secure-client-token-for-task-aaa",
"authentication": {
"schemes": ["Bearer"]
}
}
}
However, the Python implementation (BasePushNotificationSender) completely ignores authentication and sends no Authorization header.
It only attaches:
X-A2A-Notification-Token: <token>
This means that webhook endpoints cannot authenticate the caller and cannot follow the security model described in the spec.
This appears to be a spec compliance gap: push notification authentication is described by the protocol but not implemented in the Python server.
Describe the solution you'd like
I would like the Python server to:
-
Honor
PushNotificationConfig.authentication -
Support at least the
"Bearer"scheme -
Automatically add the appropriate
Authorizationheader -
Match the spec examples by sending both:
X-A2A-Notification-TokenAuthorization: Bearer <token_or_jwt>
Describe alternatives you've considered
As a workaround, we currently:
- Subclass
BasePushNotificationSender - Override
_dispatch_notification - Inject our own
Authorization: Bearer <jwt>header
This works, but:
- It duplicates logic that should be part of the framework
- It breaks consistency between Python and other A2A implementations
- It makes spec-compliant webhook security non-standard and harder to maintain
A built-in implementation would make push notification authentication reliable, consistent, and aligned with the A2A spec.
- 主要语言
- Python
- 星标
- 2.2k
- 派生
- 496
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 16
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
a2aproject/a2a-python#1261 ·
-
component: server status:awaiting response
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1237 · 1 条评论 · 已指派 1 人 ·
-
component: server status:awaiting response status:stale
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1215 · 2 条评论 · 已指派 1 人 ·
-
component: server status:awaiting response status:stale
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1205 · 3 条评论 · 已指派 1 人 ·
-
component: server status:awaiting response status:stale
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1204 · 2 条评论 · 已指派 1 人 ·
查看 a2aproject/a2a-python 的全部 Issue
相似的 Issue
-
documentation help wanted
难度 2/5 1-3 小时 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 90/100
simonw/sqlite-utils#872 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100