From b6776d816942d9605ec4d5d3a00820fe617a298a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 18 Aug 2026 22:58:42 +0200 Subject: [PATCH] Record authenticated API perimeter release --- notes/fresh-workspace-handoff.md | 10 ++++++++++ notes/ghostlight-current-system-map.md | 11 +++++++++++ state/evidence.jsonl | 1 + 3 files changed, 22 insertions(+) diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 207e63b..7d67a1e 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -835,6 +835,16 @@ peers receive `403`, and the browser hides the operator panel away from loopback. Do not replace this with trusted forwarded headers unless a named reverse proxy becomes the actual connection owner. +The subsequent perimeter audit found that protected handler JSON extractors +ran before their handler-local session checks. All `/api` routes now share one +authentication middleware which rejects invalid sessions before reading or +deserializing the body. Handler checks remain as the session-identity and +revocation guard, not the perimeter owner. Release +`f905376a2278c48bf474ab3b665fe12a241d69de` proves malformed and three-megabyte +anonymous command bodies receive `401`; authenticated malformed JSON still +reaches the normal `400` extractor path. The full workspace passed 137 core +tests and 13 daemon tests. Invitations were neither rotated nor consumed. + ## Warnings - Keep persistent state small. Git history and artifacts own chronology. diff --git a/notes/ghostlight-current-system-map.md b/notes/ghostlight-current-system-map.md index 8507066..1149b91 100644 --- a/notes/ghostlight-current-system-map.md +++ b/notes/ghostlight-current-system-map.md @@ -318,6 +318,17 @@ approval has its own route. Strategic ticks, region commits, gestalt presence, reaction waves, NPC initiative, and campaign creation are internal mailbox commands and cannot be invoked through `/api/command`. +Authentication owns entry to the complete `/api` router before request-body +extraction. Axum's protected-route middleware reads only headers and durable +session authority; an invalid session receives `401` before JSON parsing, +schema rejection, campaign lookup, inference, or mutation. Handlers repeat the +session lookup where they need the session identity, so revocation between the +perimeter check and a handler cannot leave stale authority alive. Public +`/health`, single-use `/invite/{token}`, and static browser assets remain +outside this middleware. Regressions prove malformed anonymous JSON is refused +at the perimeter while the same malformed body under a valid session reaches +the ordinary `400` extractor response. + That boundary also projects less state outward than the kernel returns inward. Player HTTP responses contain only assessment, public commit/roll receipts, and narration. Canonical campaign state and spoiler-bearing actor or institution diff --git a/state/evidence.jsonl b/state/evidence.jsonl index cb25eb5..efaafc9 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -111,3 +111,4 @@ {"ts":"2026-08-18T20:25:32Z","type":"deployment","status":"ok","branch":"codex/ghostlight-dungeon-mvp","note":"Starfire activated immutable release 12a704a508f2be1f4eee96acd46fe0dd9369b81c with executable SHA-256 58ba8e3786fda8217df39c9c325e1b2e3e481baac70c5cf51d314093055df042 and rollback 0815776fa883dd5aefc1ba18c9aa7d1e4a048beb. Typed health, manifest, executable hash, PID 17924, four persisted campaigns, DeepSeek readiness, served asset index-BxLzO9Gw.js, and the visible Speak control agree. Unauthenticated player and loopback operator surfaces returned 401 and LAN operator access returned 403. New world, destination, and fission previews now replace only the same session's older preview of that kind; a regression proves one tester's replacement cannot retire the other tester's approval. Publication did not rotate or consume invitations; the full workspace passed 137 core and 11 daemon tests."} {"ts":"2026-08-18T20:43:30Z","type":"deployment","status":"degraded","branch":"codex/ghostlight-dungeon-mvp","note":"Starfire activated immutable release b76bb5a8936624513fd0cd5e46d4d9ab11c3a517 with executable SHA-256 41928dbe73bb3e4a75e3a468d8a2c7ce725254621d17faa8a565ea526b2a3296 and rollback 12a704a508f2be1f4eee96acd46fe0dd9369b81c. Typed health, manifest, executable hash, PID 22464, four persisted campaigns, and DeepSeek readiness agree. Against canonical Odin target 10.77.0.1:17871, HTTP became healthy in 2.803 seconds; after the remote deadline one warning reported the 19-document RUDP batch could not establish an acknowledged connection. Local CultMesh and HTTP remained healthy. Independent SSH inspection found no Odin container and no UDP 17871 listener on Yggdrasil. The outage is recorded in gamecult-ops and does not transfer coordinator authority to Starfire. Publication did not rotate or consume invitations."} {"ts":"2026-08-18T18:52:00Z","type":"verification","status":"ok","branch":"codex/ghostlight-dungeon-mvp","note":"Exact release 7916ab04936ba962720cfbf4af1b83f9aa8d8b24 made every selected named member exception a mandatory Projector perspective owner, closing the seam where aggregation could erase an actionable individual before Persona choice. The strict provider-backed budget-one golden placed 24 rivals in one arena, attributed migration to member:mira-venn, moved her between depth-two population lineages, produced nine sustained material consequences including seven typed outcomes across six other background subjects, preserved her delta and the player, and automatically promoted the same Mira on return with zero rejected pulses. Witness: F:\\GameCult\\GhostlightDungeon\\acceptance\\gestalt-dynamics-7916ab0-strict\\result.json."} +{"ts":"2026-08-18T20:58:12Z","type":"deployment","status":"degraded","branch":"codex/ghostlight-dungeon-mvp","note":"Starfire activated immutable release f905376a2278c48bf474ab3b665fe12a241d69de with executable SHA-256 8ab529c908b765acba3c97bc7c9e0e78df7690b2d7da0dabf645782439b061b8 and rollback b76bb5a8936624513fd0cd5e46d4d9ab11c3a517. Typed health, manifest, executable hash, PID 21092, four persisted campaigns, and DeepSeek readiness agree. One authentication middleware now owns entry to every /api route before body extraction; deployed probes returned 401 for malformed and three-megabyte anonymous JSON, while a valid-session regression reaches the ordinary 400 parser response. The full workspace passed 137 core and 13 daemon tests. Invitations were neither rotated nor consumed. Remote Odin replication remains degraded because Yggdrasil has no UDP 17871 listener; canonical local CultMesh and HTTP remain healthy."}