OKF reference demo 4 · serving & firewall · 2026-07-16

The firewall is the endpoint, not the format

OKF encrypts nothing and access-controls nothing — and that is fine, because the format was never the protection. An external agent reads the bundle, walks the index, opens any concept. The moment it follows a resource: pointer to rehydrate the deep model without credentials, it hits a wall. Both halves run live below.

One Worker, two kinds of route

Live at okf-persona-gate.jonny-a6b.workers.dev, serving the shuriq-jonny persona bundle (164 concepts, 29 types).

routeaccessreturns
/index.mdopenbundle root — every concept, grouped by type, progressive disclosure
/<Type>/<id>.mdopenone Layer-2 concept: identity, neighbors, a gated resource: pointer
/rehydrate/<id>bearer tokenthe deep model: typed edges, attribute values, confidence scores

The contrast, captured live

Same entity, same host. The left request is what any agent on the internet gets; the right is what an authorized agent gets.

▪ without authorization — HTTP 401

$ curl …workers.dev/rehydrate/person-jonny
{
 "error": "unauthorized",
 "layer_served": 2,
 "detail": "The deep model for this entity
   (typed relationship edges, attribute
   values, confidence scores) resolves
   only for authorized agents.",
 "what_you_can_read": "The Layer-2 concept
   docs and index.md on this host are open.
   That is the export projection; this
   denial is the firewall."
}

▪ with the bearer token — HTTP 200

$ curl -H "Authorization: Bearer ●●●" \
    …workers.dev/rehydrate/person-jonny
{
 "layer": 3,
 "entity": {
  "id": "person-jonny",
  "type": "Person",
  "confidence": 0.95,
  "outgoing": [
   { "target": "ShurIQ Brand Dashboard",
     "rel": "views_dashboard",
     "confidence": 0.92 } ]
  … attributes, sources, incoming edges
 }
}

Try it yourself: walk the open bundle, open a concept, then follow its resource: pointer. You will get the 401.

The same boundary over MCP

Variant 2 of the reference implementation: a dependency-free MCP resource server (serving/okf_mcp_server.mjs).

It lists all 165 bundle files as MCP resources (okf://persona-cross-links/…) and returns frontmatter + body through resources/read. It serves the identical Layer-2 projection — and the deep model is not reachable through it at all. An agent connected over MCP sees exactly what an agent walking the Worker's open routes sees: the resource list is the projection.

claude mcp add okf-persona -- node projects/shur/okf/serving/okf_mcp_server.mjs
What this settles. The resource: URI scheme, open since profile v0.1, is decided for serving: a gated Cloudflare Worker URL, because it is real, it runs on infrastructure we already operate, and it makes the denial literal. The totem:// custom scheme stays the production direction once a resolver exists. Protection was never one mechanism — it is the poor format, the deliberate projection, and the gated endpoint, stacked. This page is the third layer running.