Skip to content

Cache public verification documents with bounded freshness - #13

Merged
ottenhoff merged 1 commit into
mainfrom
codex-public-document-cache
Oct 26, 2026
Merged

ottenhoff merged 1 commit into
mainfrom
codex-public-document-cache

Conversation

@ottenhoff

Copy link
Copy Markdown
Member

Public verification documents currently send no-store, so repeat verifier requests cannot reuse them. Allow successful DID/JWKS documents, credential issuer metadata, and both credential JSON-LD routes to be cached for 30 minutes. Cache successful revocation status lists for 10 minutes and include the matching signed credentialSubject.ttl value of 600000 milliseconds.

Downloads and verification responses retain their existing policies. Failed document lookups remain no-store, and the shared response middleware still prevents caching responses that set cookies.

The Docker runbook explains Cloudflare Cache Rules, why ten-minute freshness is not a universal revocation propagation guarantee, and the key-rotation implications of cached DID/JWKS documents. It explicitly notes that DID documents currently expose only the active key; this PR does not add staged key publication or cache purging.

Validation:

  • Lint, formatting, strict TypeScript, OpenAPI snapshots, page assets, design tokens, and Node runtime build passed.
  • Full suite with a disposable Postgres database: 330 files and 2,172 tests passed, no skips.
  • 14 script tests passed; production audit passed with no high or critical advisories.
  • New integration coverage exercises the real app handlers and Postgres: all document routes, signed status-list TTL and updated revocation bit, unchanged credential payloads, private downloads, and uncacheable missing-document responses. No module mocks or global replacements added.

Based on latest main at 5546e8c. Related: #11

@ottenhoff
ottenhoff merged commit a38ce08 into main Oct 26, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant