feat(runtime): live A2A JSON-RPC listener via ca2a start#52
Open
Susanpdl wants to merge 2 commits into
Open
Conversation
Wire parse_peer_request into handle_peer_request on message/send so a callee can enforce a PeerRequest on a live inbound call. Keep the claim boundary: no attestation handshake and no seal-to-verified-measurement binding; sealed open uses a configured software key only. Signed-off-by: Susan Poudel <susanpdl77@gmail.com>
Require an explicit host in listen_addr instead of defaulting to 0.0.0.0, which tripped the hardcoded-bind-all-interfaces scan. Signed-off-by: Susan Poudel <susanpdl77@gmail.com>
imran-siddique
approved these changes
Jul 19, 2026
imran-siddique
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the diff and thread. Scope is tight and matches the body: live inbound A2A JSON-RPC wiring for the second Tier 2 checkbox, with ordinary A2A returning ca2a: null rather than inventing a trust state, and malformed metadata plus denials failing closed with a structured ca2a_code. X25519 key handling validates length and is software-configured only, with the docs correctly caveating that it is not measurement-bound. No secrets in the diff; test keys are generated at runtime. Tests cover config, policy loader, and server paths, and all real checks are green. LGTM. Leaving the merge to a maintainer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ca2a startandca2a_runtime.server: Starlette JSON-RPC listener formessage/sendthat runsparse_peer_request→handle_peer_requestend to end (verify chain, intersect local/Cedar policy, open sealed payload when a key is configured, emit provenance).ca2a: nullwithout inventing a trust state; malformed metadata and denials fail closed withdata.ca2a_code.local_policyand optionalenclave_private_key_hex; install withpip install 'ca2a-runtime[serve]'.Closes the second Tier 2 checkbox on #47 (live inbound wiring). Does not claim attestation handshake or seal-to-verified-measurement binding.
Test plan
ruff check src/ tests/mypy src/ca2a_runtime/ src/ca2a_verify/pytest tests/unit/ tests/conformance/(195 passed)ca2a start --config examples/minimal/ca2a-config.yamlthen POST amessage/sendenvelope to/rpc