Skip to content

v0.7.0 — public reporting + paging hardening

Choose a tag to compare

@gotoplanb gotoplanb released this 05 Jul 18:15
· 114 commits to main since this release

Demos

Public report form (status page, ADR-027):

https://github.com/gotoplanb/watch/releases/download/v0.7.0/demo-status-report-form.mp4

Per-user paging subscription (/ui/settings/, ADR-013):

https://github.com/gotoplanb/watch/releases/download/v0.7.0/demo-paging-settings.mp4

(Recorded with shot-scraper video from versioned storyboards in storyboards/; the paging topic shown is a throwaway local-dev one, since rotated.)


Public self-service report surface (ADR-027)

  • Report from the status page, no sign-in. The read-only React status SPA gains a small two-tab form: report an incident or submit a session id for a trace check. Two new AllowAny endpoints (/api/report/incident, /api/report/check) reuse the same services as the authenticated paths — so a public report is a real incident / check, not a shadow. Source is stamped server-side (never client-trusted); the anonymous write surface is bounded by a per-IP throttle (10/min, env-tunable via PUBLIC_REPORT_THROTTLE) + tight input validation; no verdict leaks to the submitter ({id,status} only); CORS JSON-POST preflight handled. This is the system's first anonymous write path — deliberate: it reads nothing sensitive back, and an exposed surface is a monitorable place to build security controls.

Paging: unguessable topics + self-service subscription (ADR-013)

  • Salted topic names. Paging topics were fully derivable from the (public) source — anyone could subscribe to snoop pages or publish to spoof them, since on ntfy the topic name is the access control. NTFY_TOPIC_SECRET is now HMAC-SHA256'd with each target's identity into a 12-hex suffix (watch-<env>-user-<id>-<hmac>): each topic is independently unguessable and the secret never appears in the string. Empty secret → plain topics (back-compatible). manage.py paging_topics lists the live topics.
  • Per-user subscription page. A logged-in user clicks their username → a new /ui/settings/ page shows their own paging topic (+ full ntfy URL, copy-to-clipboard) and the tier fallback topic(s) for their tier (a rota gap pages the tier). Strictly scoped to the requester — no other user's topic ever renders.

Quality

  • Every change held to ≥90% unit coverage (98.5%) + green SonarQube; both UI surfaces verified in a real browser (Playwright) — the public form drove a live incident through intake→escalation over SSE, and the settings page confirmed correct per-user scoping.

Follow-up

  • Prod parity: wire NTFY_TOPIC_SECRET as an SSM secret in platform (like NTFY_TOKEN) so cloud topics are salted too — pending the current AWS holds.

Versioned in lockstep with platform + watchtower v0.7.0 (a compatible set; all substantive changes this cycle are in watch).