DO Key: Loading… WebCrypto: Ready

Track 9 · Agent Bridges & Discovery · Cloudflare Worker + SQLite Durable Object

Agent Well-Known Audit Lab

Websites publish machine-readable files under standard RFC 8615 /.well-known/ and root paths so automated clients can discover APIs, OAuth RFC 9728 auth servers, RFC 9421 Bot Auth Directory keys, and IETF aipref usage rules without scraping HTML. In practice, discovery breaks silently when SPA routers return HTTP 200 HTML for missing files, ephemeral keys reset across serverless restarts, or skill hashes go stale. This lab hosts all 12 endpoints on a persistent Durable Object key store alongside 5 broken test fixtures and an SSRF-hardened verifier.

Why this matters

Checking res.ok is not enough: catch-all HTML routes mask missing manifests as 200 OK, recycled serverless isolates break RFC 9421 signatures, and unverified redirect chains can leak internal network addresses.

What this opens up

Reliable machine-readable discovery across 12 /.well-known/ and root conventions, where automated clients verify cryptographic signatures, exact SKILL.md SHA-256 digests, and HTTP QUERY filters before trusting a site.

How the tests work

First run Audit This Live Worker to pass all 12 live endpoints, then run the 5 Broken Fixtures gauntlet to trigger every fault code, and finish with the HTTP QUERY + SSRF check plus independent browser WebCrypto verification.

3 Things To Try

1. Check All 12 Live Discovery Files

Audits all 12 real endpoints on this Worker, verifies Ed25519 signatures from the persistent Durable Object key store, matches SKILL.md SHA-256 bytes, and probes HTTP QUERY.

2. Catch All 5 Broken Configurations

Runs the auditor against 5 intentionally broken routes to confirm it flags HTML soft-404 pages, stale file hashes, tampered signatures, wrong MIME types, and redirect loops.

3. Test HTTP QUERY & Private-IP Blocks

Sends a live QUERY /api/skills/query filter request and attempts 4 private/local targets (127.0.0.1, 169.254.169.254, [::1], file:///etc/passwd) to verify HTTP 400 blocks.

Discovery & Signature Auditor (POST /api/audit)

Pick this Worker, a broken test fixture, or any public https:// site, then click any row to inspect its headers, signature check, and body.

Idle
Live & Public
5 Broken Fixtures
SSRF Block Tests (Expect 400)

Endpoint Summary

—

Run an audit to inspect all 12 discovery paths.

RFC 9421 Ed25519 + Content-Digest

—

Verifies directory JWK thumbprint, Content-Digest SHA-256, and Ed25519 signatures via WebCrypto.

SKILL.md SHA-256 Integrity

—

Fetches SKILL.md bytes and compares WebCrypto SHA-256 against agent-skills/index.json.

HTTP QUERY Support Probe

—

Sends HTTP QUERY with JSON filter body to /api/skills/query.

Endpoint Status HTTP Content-Type Crypto / Faults Summary
Click "Audit This Live Worker" or submit a target above.

Endpoint Headers & Signature Inspector

Click any row in the audit table or a live endpoint card to view its raw headers and verification trace.

No Selection

RFC 9421 Signature Base & Verification Diagnostics

Select a signed endpoint (such as /.well-known/http-message-signatures-directory or /.well-known/agent-card.json) to inspect the reconstructed RFC 9421 signature base and WebCrypto result.

Response Body Preview

Response body preview will appear here.

Independent Browser Signature Check

Verify the Worker's persistent WellKnownKeyStore Ed25519 signature and SKILL.md hash directly inside your browser tab.

Loading persistent Durable Object key metadata from /api/meta…

12 Live Discovery Endpoints on This Worker

Every linked API (/api/audit, /api/skills/query, /api/mcp, /api/openapi.json) responds live with zero placeholder routes.

HTTP QUERY Filter & SSRF Guard (/api/skills/query)

Send a safe read-only HTTP QUERY request with a JSON filter body, or compare GET and rejected DELETE calls.

Ready QUERY /api/skills/query
Submit the form above to inspect the live HTTP QUERY request and response wire trace.
Architecture How discovery files, persistent signing keys, and the SSRF-safe auditor fit together
Cloudflare Worker Runtime · Stable Ed25519 signing key · Live discovery routes
1. Caller

Agent or Browser Tab

POST /api/audit · QUERY /api/skills/query
  • Audits self, 5 broken fixtures, or any public https:// site
  • Re-verifies signatures locally via public/lib/verify-crypto.js
2. Worker + SSRF Gate

Discovery Auditor src/worker.ts

  1. Blocks private IPs, IPv6 literals, non-HTTPS URLs, and non-443 ports
  2. Follows redirects manually with loop checks and a 128 KiB body cap
  3. Verifies Ed25519 Signature and Content-Digest headers
  4. Matches SKILL.md SHA-256 bytes against agent-skills/index.json

Also serves all 12 live discovery files, /SKILL.md, /api/mcp, and 5 broken routes under /fixtures/*.

SQLite Key Store

WellKnownKeyStore

One stable Ed25519 keypair in SQLite
RFC 9421 Ed25519 RFC 7638 kid RFC 9530 Digest
FAIL CLOSED

Caught Fault Codes

SOFT_404 · BAD_DIGEST · BAD_SIG · BAD_MIME · REDIRECT_LOOP

Private IP targets and unsafe redirect hops reject immediately with HTTP 400 or SSRF_REDIRECT_BLOCKED.

Shared Browser & Worker Verifier public/lib/verify-crypto.js

Same Code Everywhere

The same WebCrypto module runs in Cloudflare Workers, Node.js tests, and your browser tab so you can independently verify signatures and SKILL.md hashes without trusting server output.

Storing the Ed25519 key in a SQLite Durable Object prevents signature drift across Worker restarts, while shared WebCrypto code validates every signature, digest, MIME type, and redirect hop.
How This Is Set Up

Closing the Discovery Audit Gaps

Replacing isolate-local ephemeral keys, unverified signature headers, and stub /demo/* endpoints with SQLite Durable Object key persistence and real WebCrypto verification.

Previous Gaps (Isolate Keys + Skipped Crypto)
// Ephemeral isolate key drifts whenever Workers recycle isolates:
let keysPromise = null;
const keys = await (keysPromise ??= createDemoKeys());

// Inspector checked keys[] JSON shape only — never called WebCrypto verify():
const ok = Array.isArray(parsed.keys); // Skipped RFC 9421 Signature check!

// Manifest targets pointed at placeholder /demo/* JSON stubs.
SQLite Durable Object + Real WebCrypto Verification
// Single Ed25519 keypair persisted in SQLite Durable Object (WellKnownKeyStore):
const stub = env.WELL_KNOWN_KEY_STORE.get(
  env.WELL_KNOWN_KEY_STORE.idFromName("well-known-ed25519-v1")
);

// Auditor verifies Content-Digest (RFC 9530) + Ed25519 Signature (RFC 9421):
const check = await verifyRfc9421Response({
  authority, path, headers, bodyBytes, directoryKeys
});
const digest = await computeSha256Hex(skillMdBytes); // Exact SKILL.md match
RFC 9421 Signature Base Reconstruction & WebCrypto Ed25519 Verification (public/lib/verify-crypto.js)

Exact verification pipeline executed both inside POST /api/audit and directly in the browser tab when clicking "Verify Directly in Browser WebCrypto".

const digestCheck = await verifyContentDigest(headers.get("content-digest"), bodyBytes);
const built = buildSignatureBase(parsedInput.components, {
  "@authority": authority,
  "@path": path,
  "content-digest": headers.get("content-digest"),
}, parsedInput.paramsRaw);

const publicKey = await crypto.subtle.importKey(
  "jwk",
  { kty: "OKP", crv: "Ed25519", x: matchedKey.x },
  { name: "Ed25519" },
  false,
  ["verify"]
);
const valid = await crypto.subtle.verify(
  { name: "Ed25519" },
  publicKey,
  signatureBytes,
  new TextEncoder().encode(built.base)
);
What breaks in practice

SPA routers returning HTTP 200 HTML on /.well-known/*, isolate-local keys rotating mid-verification, stale SKILL.md SHA-256 digests, and redirect chains escaping into internal IPs.

What this lab verifies

Real Ed25519 signatures over RFC 9421 bases and RFC 9530 body digests, exact byte-level SKILL.md hashes, strict media types, HTTP QUERY responses, and SSRF fail-closed guards.

Falsifiable testbed

Five intentionally broken fixtures under /fixtures/* guarantee the auditor cannot pass by rubber-stamping HTTP 200 responses—every defect produces a concrete machine-readable fault code.

Key terms & further reading
RFC 8615 /.well-known/
Standard URL prefix where websites publish site-wide machine-readable metadata files without colliding with application routes.
RFC 9421 Bot Auth Directory
A signed JSON key directory at /.well-known/http-message-signatures-directory used to verify RFC 9421 HTTP signatures.
OAuth Protected Resource Metadata (RFC 9728)
A discovery JSON document telling automated clients which OAuth authorization server and scopes govern an API.
IETF aipref (Content-Usage)
An IETF standard vocabulary for declaring how automated crawlers and AI systems may train on or index published web content.
HTTP QUERY Method
A draft safe, idempotent HTTP method that sends structured filter payloads in the request body instead of stuffing long strings into URLs.
Cloudflare Durable Objects
Single-writer edge compute objects with embedded SQLite storage that keep signing keys and state consistent across Worker restarts.