Skip to content

feat(runtime): live A2A JSON-RPC listener via ca2a start#52

Open
Susanpdl wants to merge 2 commits into
agentrust-io:mainfrom
Susanpdl:feat/live-a2a-inbound-serving
Open

feat(runtime): live A2A JSON-RPC listener via ca2a start#52
Susanpdl wants to merge 2 commits into
agentrust-io:mainfrom
Susanpdl:feat/live-a2a-inbound-serving

Conversation

@Susanpdl

Copy link
Copy Markdown
Contributor

Summary

  • Adds ca2a start and ca2a_runtime.server: Starlette JSON-RPC listener for message/send that runs parse_peer_requesthandle_peer_request end to end (verify chain, intersect local/Cedar policy, open sealed payload when a key is configured, emit provenance).
  • Ordinary A2A (no cA2A keys) returns ca2a: null without inventing a trust state; malformed metadata and denials fail closed with data.ca2a_code.
  • Config gains local_policy and optional enclave_private_key_hex; install with pip 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)
  • CI green on this PR
  • Manual: ca2a start --config examples/minimal/ca2a-config.yaml then POST a message/send envelope to /rpc

Susanpdl added 2 commits July 19, 2026 10:02
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 imran-siddique left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants