Skip to content

v0.2.0: Admin pages, backups and recovery

·All releases ·GitHub release

Admin pages

/admin lists bundles, sets and deletes secrets, shows the audit log, and re-encrypts secrets after a master key rotation. It sits behind Cloudflare Access, and the Worker also checks Access’s token itself: the team’s keys, the application’s audience and an email allowlist. Values are write-only; no screen or API response shows one.

Bundles: a stat strip over each bundle’s secrets, with their versions, key ids and who changed them

Setting a secret: the value field is masked

Deleting a secret asks for confirmation

The audit log: exchanges and admin changes, with names but never values

Master key: one secret is still on the previous key, so re-encrypt is offered

Backups and recovery

  • A daily cron backs up every secrets row, still encrypted, to R2, and prunes backups after 90 days.
  • portona-restore turns a backup into a cf d1 query --batch file.
  • PORTONA_MAINTENANCE: "on" refuses exchanges and admin changes without writing to D1. Because it’s a binding, restoring the database can’t turn it off. See Backups and recovery.

Hardening

  • Only /, /healthz and /v1/exchange are public. Every other path goes through the Access check, and paths containing % or // are refused.
  • Re-encryption replaces a row only if its version, key id and IV are unchanged, so a secret deleted and recreated mid-pass keeps its new value.
  • Audit rows are written only for tokens whose signature verified, and request bodies are capped while they’re read.
  • broker-run requires https (loopback excepted), refuses redirects, never prints Portona’s replies, and fails if the bundle lacks a name passed with --env.
  • A JWKS that answers with an error is an outage (503), not a refusal.