Skip to content

test(e2e): prove A-to-B auth, deny codes, and token isolation - #119

Merged
pavelanni merged 1 commit into
mainfrom
test/e2e-a2a
Nov 7, 2026
Merged

pavelanni merged 1 commit into
mainfrom
test/e2e-a2a

Conversation

@pavelanni

Copy link
Copy Markdown
Collaborator

Summary

One in-process test proving the Phase 2 definition of done:

  • Agent B runs a real newServeHandler with inbound auth on.
  • A stand-in supervisor (httputil.ReverseProxy) injects a test-issuer token per request.
  • Agent A runs a real buildRuntime and calls B through a2a_call.
  • Both use scripted fake providers that record every input.

Asserted:

  • A's final text contains [completed] B says hi.
  • B logs sub=alice and the full azp SPIFFE ID.
  • The raw token appears nowhere in B's provider input (system prompt, all messages, tool calls/results), B's log, A's provider input, or B's SQLite session store.
  • Six deny rows surface as peer engineering-analyst: <status> <code>: 401 token_expired, 403 invalid_audience, 403 insufficient_scope, 403 caller_not_allowed, 401 missing_token, 503 jwks_unavailable.

Test plan

go test -race -run TestE2E -v ./internal/cmd
make lint test
markdownlint-cli2 deploy/README.md

No earlier-WP defects were exposed; the test passed against the merged code.

Agent A calls agent B through a2a_call; a stand-in supervisor injects a
test-issuer token. The test asserts B logs the verified identity, every
deny code reaches A's tool result, and the raw token is absent from B's
provider input, logs, and session store.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

@pavelanni
pavelanni marked this pull request as ready for review November 7, 2026 00:44
@pavelanni
pavelanni merged commit 915df35 into main Nov 7, 2026
5 checks passed
@pavelanni
pavelanni deleted the test/e2e-a2a branch November 7, 2026 00:44
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.

1 participant