Signed report links: plan notes link the report and plans without a console session #2

Merged
jhgaylor merged 2 commits from lex00/sluice:report-links into main 2026-10-08 07:41:10 +00:00
Collaborator

Closes #1.

Plan notes link the run's report and each root's plan through a signed Sluice route, <PUBLIC_URL>/r/<run id>.<expiry>.<mac>/<file> (HMAC-SHA256), so a reviewer opens them without a console account; the bucket is never exposed, links last 30 days (REPORT_LINK_TTL_DAYS), every push or /terragucci plan re-signs, and rotating REPORT_LINK_SECRETS revokes them all. The note no longer says "artifact of this run". Decision and rejected options: docs/report-links.md.

Tests: bun test 344 pass, 3 skip, 0 fail (15 new); bun run typecheck clean.

Closes #1. Plan notes link the run's report and each root's plan through a signed Sluice route, `<PUBLIC_URL>/r/<run id>.<expiry>.<mac>/<file>` (HMAC-SHA256), so a reviewer opens them without a console account; the bucket is never exposed, links last 30 days (`REPORT_LINK_TTL_DAYS`), every push or `/terragucci plan` re-signs, and rotating `REPORT_LINK_SECRETS` revokes them all. The note no longer says "artifact of this run". Decision and rejected options: docs/report-links.md. Tests: `bun test` 344 pass, 3 skip, 0 fail (15 new); `bun run typecheck` clean.
The executor signs a link for plan, replan and drift runs, <PUBLIC_URL>/r/<run id>.<expiry>.<mac>,
and passes <link>/report.html to terragucci as --report-url. terragucci links a URL ending in .html
as the report itself, so the note says [Full report](...) with its anchors instead of "report.html
in the terragucci-report artifact of this run", and the drift issue does the same. Until
terragucci links each root's plan (INTENTIUS/terragucci#525), sluice adds a "Plan output:" line
above the note's footer linking roots/<root>/plan.txt under the same link; it drops the line once
the note mentions plan.txt.

GET /r/<token>/<file> needs no session. It checks the HMAC (REPORT_LINK_SECRETS, [0] signs, all
verify; empty derives a key from SESSION_SECRET) and the expiry (REPORT_LINK_TTL_DAYS, 30), reads
report_key from the run row, refuses an estate that is not active and the run's own sluice log,
and serves the object with the console's sandboxing headers plus noindex. An expired link is a
410 that says how to get a fresh one. The console route is unchanged.
docs: who can open a plan note's report, and why a signed sluice route (sluice#1)
Some checks failed
test / test (pull_request) Has been cancelled
508a5e3a7e
docs/report-links.md decides the questions in the issue: anyone holding the link, a signed
/r/<token> route rather than a presigned or public bucket or a forge read check, 30 days from the
latest plan, revoked by rotating REPORT_LINK_SECRETS, and what a leaked plan.txt shows (every
value the plan does not mark sensitive). It lists what terragucci#525 must do. SPEC, ARCHITECTURE,
OPERATIONS (rotation), the README, home-cloud, the plan and the design-partner runbook follow.
lex00 force-pushed report-links from 508a5e3a7e
Some checks failed
test / test (pull_request) Has been cancelled
to 42142fdf62
All checks were successful
test / test (pull_request) Successful in 2m48s
2026-10-08 07:37:17 +00:00
Compare
Sign in to join this conversation.
No reviewers
No labels
terraform-plane
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/sluice!2
No description provided.