rouse-context/docs
Jason Monk 7c5397661f
Fix #215: Render relay env + firebase-sa from GH secrets at deploy time (#219)
Move all relay runtime secrets off manually-maintained /etc/rouse-relay/env
and into GitHub repo secrets. The deploy workflow now renders both the
systemd EnvironmentFile and the Firebase service account JSON from repo
secrets on each run, scps them to /tmp, then moves them into
/etc/rouse-relay/ with the correct ownership and mode.

Rotation is now a gh secret set + workflow_dispatch instead of an SSH
session. Bootstrapping a fork only needs the secrets populated — no more
remembering which env vars the VPS needs.

- relay-deploy.yml: new "Render" step writes env + firebase-sa.json into a
  mode-0700 tempdir using printf + file redirection (never echo, never
  secret values on argv). Deploy step scps and installs alongside the
  binary. Tempdir is shredded on exit.
- scripts/backfill-relay-secrets.sh: maintainer tool that re-syncs GH
  secrets from the live VPS. Explicit "yes" prompt, set -u -o pipefail
  (no -x to avoid leaking values), shred -u on exit, never echoes
  secret values.
- docs/self-hosting.md: new appendix documenting the secret inventory,
  naming convention split (existing CLOUDFLARE_* unprefixed; new
  RELAY_*), rotation procedure, and pointer to the backfill script.

Secrets already populated on the repo (values pulled from the running
VPS and verified byte-for-byte parity with the workflow-rendered output):
  CLOUDFLARE_API_TOKEN, CLOUDFLARE_ZONE_ID (pre-existing, re-synced),
  RELAY_RUST_LOG, RELAY_GTS_EAB_KID, RELAY_GTS_EAB_HMAC,
  RELAY_FIREBASE_SERVICE_ACCOUNT_JSON (base64 of firebase-sa.json).

First post-merge deploy will overwrite /etc/rouse-relay/env and
firebase-sa.json with the workflow-rendered versions. Parity confirmed
before merging; flagging for user's eyes on the first run.

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-04-17 19:39:41 -04:00
..
auth-pages Regenerate auth page gallery with correct icon 2026-04-08 08:53:44 -04:00
design Fix #170: align /renew request/response shapes between client and relay 2026-04-15 19:41:25 -04:00
notifications Fix #79: Remove stale NotificationModel references from docs 2026-04-12 13:02:21 -04:00
screenshots Regenerate screenshots after design language refactor 2026-04-07 12:25:12 -04:00
user Set baseurl to empty for custom domain on GitHub Pages 2026-04-16 17:47:49 -04:00
audit.md Fix #138: Add documentation audit — inventory, classify, punch list 2026-04-14 19:24:15 -04:00
device-test-report.md Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
e2e-status.md Document e2e status: mTLS connection works, passthrough routing is the current blocker 2026-04-06 14:10:36 -04:00
overnight-plan-2.md Add connection hardening, integration test gaps to backlog and plan 2026-04-06 17:11:39 -04:00
screenshot_audit_tab.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
screenshot_connected.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
screenshot_dashboard.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
screenshot_settings_tab.png Add device integration test report and screenshots 2026-04-07 09:03:32 -04:00
security-audit-2026-04-07.md Add security audit report: 23 findings across 4 severity levels 2026-04-07 08:49:14 -04:00
security-decisions.md Add security decisions log for evaluated-and-accepted risks 2026-04-07 09:07:31 -04:00
security.md Add comprehensive security overview document 2026-04-10 09:39:55 -04:00
self-hosting.md Fix #215: Render relay env + firebase-sa from GH secrets at deploy time (#219) 2026-04-17 19:39:41 -04:00
test-coverage-audit.md Fix #79: Remove stale NotificationModel references from docs 2026-04-12 13:02:21 -04:00
workflow.md Add T-11 security monitoring task, renumber subsequent tasks 2026-04-04 19:48:46 -04:00