← Back to Pull requests

feat(a2a-bridge): enforce AAuth proof of possession at the HTTP edge #733

Closed
unknown closed this pull request without merging on Nov 05, 2026 17:26 UTC
View on GitHub
unknown unknown commented on Nov 01, 2026 18:16 UTC
Author

  • A captured bearer credential must not be sufficient to mint a caller identity at the bridge edge.

  • Replay state must be shared across bridge instances, bounded in time, and provisioned by the operator rather than silently created by the workload.

  • Operators need request records that distinguish the verified caller, the bridge presenter, the minted principal, and the reason for every refusal.
  • <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    High Risk

    Changes HTTP authentication before credential minting and adds cross-instance replay state; misconfiguration or bucket issues can block legitimate traffic or weaken enforcement.

    > Overview

    The a2a-bridge HTTP edge now verifies AAuth proof of possession (RFC 9421) before the auth callout mints a caller credential, with default enforce mode and shadow/off only when A2A_BRIDGE_AAUTH_DEV_UNENFORCED is set. Failed proofs return structured 401/503 responses; admitted and refused requests get audit logs naming caller, a2a-bridge as presenter, and Trogon-Req-Id.

    > enforce (and shadow on NATS transport) records signature jti and server nonces in shared JetStream KV bucket AAUTH_REPLAY (history 1, max age 180s). The bridge opens but does not create the bucket; local compose adds nats-kv-provision plus PLATFORM user kv-provisioner and provision-kv.sh, with runbooks for manual provisioning.

    > Verification is wired through trogon-aauth-verify (nats-kv), new edge_auth config/guards, bearer–signer binding, and optional challenge nonces. Mint path now uses case-insensitive Bearer parsing.

    > <sup>Reviewed by Cursor Bugbot for commit f3271c58836efd92cdbdb3cecdd099f24cd6c2d8. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 244 lines (+183 / -61) across 3 files Reviewer: yordis Review duration: 5709m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.67) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.67 · 244 lines diff across 3 files
    0.67
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    57%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.067
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #733"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 67% (HIGH) · Higher = larger blast radius
    67%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 58.0% · Lower = rushed or shallow review
    58.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.1% · Safe to merge
    28.1%