Security
The agent lane is server-readable by design. We don't claim zero-knowledge on the API lane. What we do guarantee is that PII never names a storage object, deletions are audited, and retention is a synchronous DML burn, not a lazy sweeper.
Threat model
What we protect against v0
- PII on disk: the Durable Object is NOT named after the email address. The
ADDR_INDEXKV directory mapslower(address) → randomULID. The address lives only in the KV value and themailbox_idcolumn — never in the DO instance name visible in tooling. - Auditable deletion: every burn (TTL, read-once, user, destroy) appends a row to the
audittable:{id, mailbox_id, deleted_ms, trigger}. The burn alarm runs a synchronousDELETE ... WHERE expiry_ms <= nowat the exact expiry — not a background sweep. - Message size cap: inbound mail over 5 MB is rejected at the SMTP level (
552). No unbounded R2 writes from a single message. - Address enumeration: the
ADDR_INDEXKV supports asetRejectpath so unknown addresses get a uniform550— unknown ≠ suspended. No oracle for "does this address exist." - Rate limits: per-IP and per-identity rate limits on the API lane. The DO's single-writer property keeps concurrent access safe without a distributed lock.
What's P3 (honest) coming
Key scoping
v0 has no auth on the API lane — the address IS the handle. P3 adds key-scoped access: a caller's key can only touch its own identities. Until then, anyone who knows an address can read that mailbox. That's the server-readable trade-off: the API is agent-readable, so the address is the credential. P3 key scoping closes that gap.
Rate limit hardening
v0 rate limits are per-IP. P3 adds per-identity quotas tied to the tier (50 / 5k / 25k sends, user decision 2026-12-01). Overage is $0.35/1k at CF cost, no markup.
Key rotation + scoping
P3: short-lived, scope-limited API keys with rotation. v0 keys are account-level.
The server-readable trade-off
The API lane is deliberately readable by the server. We parse the plaintext we stored, we run extraction server-side, and the DO owns the hibernated WebSocket. This means:
- Extraction is lossy without an LLM. v0 is a regex + keyword heuristic. A verification email that buries the code in an HTML table with no keyword context may not be caught. The LLM fallback is a paid-tier addition.
- The mail body is stored in the DO's SQLite row (inline for small bodies, R2 key for larger ones). R2 lifecycle policy handles the byte-level expiry; the DO alarm handles the row-level burn. Both are synchronous DML at the exact expiry.
- Connected WebSocket frames are metadata only (envelope index, burnt signals). Bodies are fetched on demand via
read_email. A compromised socket can see that mail arrived, not what's in it.
Bindings
The deployment runs on one Cloudflare Worker with:
MAILBOX DurableObjectNamespace (MailboxDO — one SQLite DO per address)
ADDR_INDEX KVNamespace (lower(address) → randomULID; PII-free dir)
ONESHOT KVNamespace (read-once claim tokens, native TTL)
BODIES R2Bucket (raw MIME bytes, key = mb/{address}/{msgid}.eml)
DOMAIN var (nimpost.com)