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.
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
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
localBlockedIps + ceil:<ip>verifyRequestContentDigest()Ed25519 + replayStore.consume()cnf.jkt === signerThumbprintiss, aud, exp, sub, act, scopesDENY > ALLOW / step_up / anon:<ip>Your Business Handler
Invoked strictly when allowed === true. Denials return spec-compliant 401/403/429 JSON-RPC.
verification.allowed === trueDefense-in-depth mechanisms protect bundle delivery, key resolution, and runtime passport binding.
Signed Snapshot Integrity
Every downloaded policy bundle is verified against your server's pinned trustedBundlePublicKeys. Man-in-the-middle tampering is cryptographically rejected.
Anti-Rollback Protection
Each bundle carries a strictly increasing 64-bit sequence counter. Replaying a stale captured bundle triggers bundle_rollback_detected.
Unambiguous Key Locators
Bundle validation enforces unique key locators globally. Unverified domains can only publish keys fetched directly from their HTTPS /.well-known directory.
Proof-of-Possession (PoP)
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.
Orthogonal Principals
RFC 9421 authenticates the software workload; cached OAuth 2.1 JWKS snapshots validate user identity, audience, actor claims (act), and scopes.
Dual-Bucket Rate Shield
ceil:<ip> drops volumetric floods before body hashing, while anon:<ip> caps unverified callers without throttling verified AI agents.
evaluatePolicy() enforces default-deny semantics with an explicit, predictable evaluation order.
01 · HARD CRYPTO FAILInvalid RFC 9421 signature, Content-Digest mismatch, malformed or expired OAuth JWT, or invalid runtime passport immediately denies the call.
02 · PROVIDER STATUSProviders marked SUSPENDED, REVOKED, or BANNED in the trust snapshot are rejected before rule matching.
03 · EXPLICIT DENYMatching DENY rules for the target action and tool take unconditional precedence over any ALLOW rule.
04 · ALLOW REQUIREMENTSCandidate ALLOW rules check snapshot freshness, requiredPassports, providerTiers, minTrustScore / maxAbuseScore, and key scopes.
05 · STEP-UP OR DEFAULT DENYIf an agent satisfies identity rules but lacks user OAuth scopes, evaluation returns step_up (HTTP 401 RFC 9728); otherwise defaultEffect: DENY.
Business payloads, MCP tool arguments, and end-user tokens never leave your server.
| Data Category | Processing Location | Sent to AgentBouncer Cloud | Engineering Note |
|---|---|---|---|
| Request Payload & MCP Tool Arguments | Your server memory only | Never transmitted | Stream-hashed with SHA-256 (bounded by maxBodyBytes) and never leaves your infrastructure. |
| Sensitive Headers (Authorization, Cookie, X-API-Key) | Stripped by collectVerificationHeaders() | Never transmitted | Validating OAuth JWTs uses local JWKS snapshots; raw user tokens are never logged. |
| Agent Private Signing Keys | Agent runtime environment | Never stored | Policy bundles distribute public verification keys (Ed25519 / EC / RSA JWKs) only. |
| Signed PolicyBundle Snapshot | Local 0o600 file + process RAM | Outbound GET every 30s | Atomically persisted via temp-file rename; supports up to 24h full offline operation. |
| Aggregated Decision Telemetry | In-memory hourly buckets | Counts & metadata (optional) | Flushes aggregated counters per (provider, tool, allowed, reason). Fully disabled on Enterprise air-gap. |
Your handler receives a strongly typed result containing verified provider metadata, passports, OAuth claims, and matched policy rule.
{
"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
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