System Specification · SDK v1.0Blueprints A-01 — A-05

In-process verification with zero proxy hops.

AgentBouncer strictly decouples enforcement from management. Every signature check, passport verification, OAuth 2.1 validation, and DDoS rate limit executes synchronously in your server's memory in < 0.3 ms. AgentBouncer Cloud operates out-of-band: compiling Ed25519-signed PolicyBundles, syncing external key directories, and ingesting aggregated telemetry.

Key Engineering Properties

Inline Latency
< 0.3 ms (in-memory)
Policy Snapshot
EdDSA JWS (OKP Ed25519)
Offline Autonomy
24 hours (atomic disk cache)
Core RFCs
RFC 9421 · RFC 9530 · RFC 9728
Execution TopologyA-01

Request Pipeline, Sync & OAuth 2.1 Step-Up

Switch views to inspect the synchronous in-process pipeline, background Control Plane sync, and two-step MCP OAuth 2.1 flow.

Interactive System Blueprint · v1.0

Separation of In-Process Data Plane & Out-of-Band Control Plane

External Caller

AI Agent / MCP Client

  • Signature + Signature-Input
  • Signature-Agent + Content-Digest
  • Agent-Passport / AgentKit
  • Authorization: Bearer ...
Inside Your Node.js Process · < 0.3 ms
withMcpProtection(bouncer)
01. IP Blocklist & Ceiling Limit
localBlockedIps + ceil:<ip>
02. Streamed Body SHA-256
verifyRequestContentDigest()
03. RFC 9421 & Replay Nonce
Ed25519 + replayStore.consume()
04. Passport & PoP Binding
cnf.jkt === signerThumbprint
05. Local OAuth 2.1 JWKS
iss, aud, exp, sub, act, scopes
06. Policy Engine & Bot Limit
DENY > ALLOW / step_up / anon:<ip>

Your Business Handler

MCP Tool Execution

Invoked strictly when allowed === true. Denials return spec-compliant 401/403/429 JSON-RPC.

verification.allowed === true
Cryptographic GuaranteesA-02

PolicyBundle Security & Anti-Spoofing Controls

Defense-in-depth mechanisms protect bundle delivery, key resolution, and runtime passport binding.

01

Signed Snapshot Integrity

Ed25519 JWS (agentbouncer-policy-bundle+jws)

Every downloaded policy bundle is verified against your server's pinned trustedBundlePublicKeys. Man-in-the-middle tampering is cryptographically rejected.

02

Anti-Rollback Protection

Monotonic bundleSequence Counter

Each bundle carries a strictly increasing 64-bit sequence counter. Replaying a stale captured bundle triggers bundle_rollback_detected.

03

Unambiguous Key Locators

Strict (signatureAgent, kid) Uniqueness

Bundle validation enforces unique key locators globally. Unverified domains can only publish keys fetched directly from their HTTPS /.well-known directory.

04

Proof-of-Possession (PoP)

Cryptographic Key-Bound Passports

Portable Agent-Passports bind cnf.jkt to the SHA-256 thumbprint of the RFC 9421 signing key. Stolen passport headers cannot be used with another key.

05

Orthogonal Principals

Independent Agent & User Verification

RFC 9421 authenticates the software workload; cached OAuth 2.1 JWKS snapshots validate user identity, audience, actor claims (act), and scopes.

06

Dual-Bucket Rate Shield

Pre-Crypto & Post-Crypto Rate Ceilings

ceil:<ip> drops volumetric floods before body hashing, while anon:<ip> caps unverified callers without throttling verified AI agents.

Deterministic Policy EngineA-03

Rule Evaluation Precedence

evaluatePolicy() enforces default-deny semantics with an explicit, predictable evaluation order.

01 · HARD CRYPTO FAIL

Invalid RFC 9421 signature, Content-Digest mismatch, malformed or expired OAuth JWT, or invalid runtime passport immediately denies the call.

02 · PROVIDER STATUS

Providers marked SUSPENDED, REVOKED, or BANNED in the trust snapshot are rejected before rule matching.

03 · EXPLICIT DENY

Matching DENY rules for the target action and tool take unconditional precedence over any ALLOW rule.

04 · ALLOW REQUIREMENTS

Candidate ALLOW rules check snapshot freshness, requiredPassports, providerTiers, minTrustScore / maxAbuseScore, and key scopes.

05 · STEP-UP OR DEFAULT DENY

If an agent satisfies identity rules but lacks user OAuth scopes, evaluation returns step_up (HTTP 401 RFC 9728); otherwise defaultEffect: DENY.

Data Governance & Security BoundariesA-04

What Stays Inside Your Infrastructure

Business payloads, MCP tool arguments, and end-user tokens never leave your server.

Data CategoryProcessing LocationSent to AgentBouncer CloudEngineering Note
Request Payload & MCP Tool ArgumentsYour server memory onlyNever transmittedStream-hashed with SHA-256 (bounded by maxBodyBytes) and never leaves your infrastructure.
Sensitive Headers (Authorization, Cookie, X-API-Key)Stripped by collectVerificationHeaders()Never transmittedValidating OAuth JWTs uses local JWKS snapshots; raw user tokens are never logged.
Agent Private Signing KeysAgent runtime environmentNever storedPolicy bundles distribute public verification keys (Ed25519 / EC / RSA JWKs) only.
Signed PolicyBundle SnapshotLocal 0o600 file + process RAMOutbound GET every 30sAtomically persisted via temp-file rename; supports up to 24h full offline operation.
Aggregated Decision TelemetryIn-memory hourly bucketsCounts & metadata (optional)Flushes aggregated counters per (provider, tool, allowed, reason). Fully disabled on Enterprise air-gap.
SDK Verification OutputA-05

Structured Decision Contract

Your handler receives a strongly typed result containing verified provider metadata, passports, OAuth claims, and matched policy rule.

await bouncer.verify({ request, action, tool })
In-Memory Return Object
{
  "decisionId": "c4b8e210-9a14-4d73-8b11-5092f3e8c402",
  "verified": true,
  "allowed": true,
  "reason": null,
  "snapshot": {
    "bundleId": "7d91a032-112c-4f08-9211-a4319d0f221b",
    "bundleSequence": "48",
    "fresh": true
  },
  "provider": {
    "id": "clx9p2m1a0004...",
    "slug": "acme-research-agent",
    "name": "Acme Research Agent",
    "tier": "TIER_2",
    "status": "VERIFIED",
    "trusted": true,
    "trustScore": 88,
    "abuseScore": 0
  },
  "passports": [
    {
      "scheme": "org_verified",
      "assertionType": "VERIFIED_ORG_SPONSOR",
      "source": "bundle",
      "status": "verified",
      "issuer": "https://app.agentbouncer.io",
      "score": 92
    },
    {
      "scheme": "agentbouncer_passport",
      "assertionType": "PORTABLE_PASSPORT",
      "source": "header",
      "status": "verified",
      "claims": { "popBound": true }
    }
  ],
  "oauth": {
    "status": "valid",
    "authenticated": true,
    "sub": "user_9481",
    "issuer": "https://auth.customer.com",
    "scopes": ["mcp:orders:read", "mcp:orders:refund"]
  },
  "checks": {
    "passport": "verified",
    "signature": "valid",
    "oauth": "valid",
    "policy": "matched"
  },
  "policy": {
    "mode": "CUSTOM",
    "wouldBlockReason": null,
    "matchedRule": {
      "id": "rule_refund_tier2_oauth",
      "name": "Refunds require Tier 2 + user OAuth",
      "effect": "ALLOW"
    },
    "defaultEffectApplied": false
  }
}

Decision Semantics

verified vs. allowed

verified

true

allowed

true

Cryptographic identity verified and all tool policy & OAuth requirements satisfied.

verified

true

allowed

false

Valid signature, but blocked by Tier/reputation rule or awaiting OAuth 2.1 user token (step_up).

verified

false

allowed

true

Occurs on explicitly public rules or in MONITOR_ONLY mode (simulated block saved in wouldBlockReason).

verified

false

allowed

false

Missing or invalid signature, replay detected, body digest mismatch, or IP rate limit exceeded.

Incorrect Gate (Authentication Only)

if (!verification.verified) return deny();

Correct Authorization Gate

if (!verification.allowed) return deny();

Ready to test on your MCP endpoint?

Deploy withMcpProtection() in observation mode in 5 minutes