Agent Card signature verification (spec §8.4) is missing from the Java SDK
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- java
调研方向
Start by reading the Java SDK’s AgentCardSignature record and A2ACardResolver, then compare the Python signing interoperability vectors and canonicalization vectors named in the issue. Before implementation, agree on the verification scope, shared module location, and resolver integration; the issue also flags unresolved canonicalization details in spec issue #2122. Done means Java verifies the agreed interoperable cases and rejects the specified invalid signatures.
由索引模型根据 Issue 内容生成。
描述
The A2A spec defines JWS signatures over the Agent Card in §8.4, and the other SDKs implement them:
- a2a-python —
src/a2a/utils/signing.pyplus_jcs.pyfor RFC 8785 canonicalization - a2a-js —
src/signature.ts - a2a-go —
a2acrypto/
In a2a-java there is nothing behind it. AgentCardSignature in spec is a data record that carries protected, signature and header, and A2ACardResolver fetches a card and deserializes it with no verification step and no hook to add one. So a Java client cannot tell a signed card from an unsigned one, and the signatures field it parses is decoration.
That matters most where the card is fetched over a channel the client does not fully control, or served by a registry rather than the agent itself — which is the case §8.4 exists for.
What I would like to agree on before writing anything
- Scope of a first slice. Verification only —
verify(AgentCard, PublicKey)/ aJWKSet-backed resolver — with signing left for later, or both at once? - Where it lives. A new
spec-adjacent module, orhttp-clientnext toA2ACardResolver? It needs to be usable from the gRPC and REST transports too, which argues for somewhere neutral. - How it plugs into
A2ACardResolver. Opt-in strategy object, default no-op? I would rather not change the default behaviour of a card fetch in a patch release. - Dependencies. ES256 is reachable through the JDK's own JCA (
SHA256withECDSAinP1363Format), and RFC 8785 canonicalization is a few hundred lines, so this can land with no new dependency. The alternative is nimbus-jose-jwt. I lean to no new dependency; say the word if you would rather have the library.
On interop testing. a2a-python publishes language-neutral vectors — tests/utils/signing_interop_vectors.json (MUST-ACCEPT and MUST-REJECT cases with expected canonical bytes and a published test key) and jcs_vectors.json. Those make the whole thing verifiable offline with no network and no credentials, and they pin us to the same canonical bytes the other SDKs produce.
One caveat worth stating up front: spec issue #2122 notes that §8.4.1 canonicalization is under-determined and that two SDKs disagree on parts of it. I would scope the first slice to the vectors that do not depend on that ambiguity, and leave the disputed cases until the spec settles, rather than encoding one SDK's reading into Java.
Happy to take this on if the direction is right — I would rather agree on 1–3 first than send a PR that guesses.
- 主要语言
- Java
- 星标
- 510
- 派生
- 196
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 57
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
a2aproject/a2a-java#1298 ·
维护者通常 1 天内回复
-
fix: handle blank push notification config id consistently across transports可能已有人在做 @prachisinghal-1 于 15 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-java#1012 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-java#464 · 1 条评论 ·
维护者通常 1 天内回复
-
Create a sample that demonstrates how to use a shared contextId across multiple tasks可能重新可做 @tanish111 于 382 天前认领,目前没有进行中的 PR。 未关闭sample
难度 2/5 1-3 小时 新手友好度 70/100
a2aproject/a2a-java#375 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Task state transitions are not tracked可能重新可做 @sumitvairagar 于 21 天前认领,目前没有进行中的 PR。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
a2aproject/a2a-java#1222 · 4 条评论 ·
维护者通常 1 天内回复
查看 a2aproject/a2a-java 的全部 Issue
相似的 Issue
-
getRawTextContent() returns the lines of every page in reverse order (bottom to top) since 4.0.3未关闭
难度 1/5 1-3 小时 新手友好度 90/100
-
bug subsystem:agent-harness triage
难度 2/5 1-3 小时 新手友好度 72/100
ShaftHQ/SHAFT_ENGINE#7797 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
NationalSecurityAgency/ghidra#10155 ·
维护者通常 2 天内回复
-
area:data coverage
难度 1/5 1 小时以内 新手友好度 67/100
reacher-z/Awesome-CUA#4864 ·
维护者通常 19 天内回复
-
bug web-ui
难度 2/5 1-3 小时 新手友好度 67/100
jenkinsci/jenkins#27705 · 3 条评论 ·
维护者通常 1 天内回复