P5 monitoring: the Paperless consume-and-find and Listmonk render-and-send checks call the PUBLIC door on browser-gated API paths (302 → /authz/signin) — Document archive + Newsletters read DOWN forever on a gateway co-host while both serve (Whakat… #1503
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1503
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
On the Whakatōhea Demo community (founded 2026-09-16 on a rented 8 GB gateway by the phase-9 journey's demo profile, run
20260915T235523Z, seven services placed on the gateway at the founding page), P5 monitoring marks Document archive and Newsletters DOWN (severity critical) from the first aggregation pass and never recovers, while both upstreams run and answer:paperless-weblistening on0.0.0.0:28981,GET /→ 302 (its own login);listmonkon[::]:9010,⇨ http server started.GET /api/v1/monitor/statuson the gateway (14 min after founding):{"all_healthy":false, services: newsletters up:false critical, document-archive up:false critical, devices[0].status "document archive down"}; alert-count 4.Cause
Both functional checks call the service's PUBLIC door with the admin credential, and the front door browser-gates exactly the paths they call:
The rendered
machines/gateway/front-door.nixon the box:document-archiveblock:forward_auth … @unauth → redir …/authz/signin 302with no exempt matcher at all —internal/clan/portroute.goregistersPaperlessSlug: {ServePort: paperlessServePort}with noExemptPaths("wholly browser-gated", by design).newslettersblock:@newsletters_exempt path /subscription/* /link/* /api/public/* /uploads/*(NewslettersExemptPaths,internal/clan/newsletters.go:122) — the admin API (/api/lists,/api/campaigns,/api/health) is gated.The checks (
control-plane/cmd/control-plane/paperlesshealth.gopaperlessToken→POST {root}/api/token/;newslettershealth.gonewslettersServing→ the admin API) therefore fail on every pass with an HTTP 302 they read as "could not sign in" / "the API is not answering". Files greens because its check rides/status.php+/ocs/…, which ARE exempt (@files_exempt); Community archive and Data collections green because their whole/api/*is exempt.This is not founding-specific: the same
portServemap renders the P4 control-panel co-host route, so any gateway-hosted Paperless/Listmonk should show the same permanent DOWN in P5. Brand-reach drive 8 (#1277) proved these two services' deploy-time health (the P4 gate over loopback/mesh) and their doors — not the P5 public-door check — which is why it never showed.What to decide (two-way door; the agent can rule under ADR 0174)
Either (a) probe these two over the gateway-local address the deploy-time health gate already uses (loopback
127.0.0.1:28981/:9010, or the mesh address for a device host), keeping the browser gate exactly as designed; or (b) exempt the narrow API paths the checks need (/api/token/+/api/documents/…+/api/tasks/…for Paperless;/api/lists,/api/subscribers,/api/campaigns/*,/api/healthfor Listmonk) — which also opens those paths to anyone holding the app credential, a posture change ADR 0074 should weigh. (a) matches how Files/archive checks are already honest without widening the gate.Acceptance
whakatohea-demo.idss.nzat 209.38.89.233 is standing and KEPT — do not release it; read-only inspection via the phase-9 run's rent-operator key on matou-workstation),GET /api/v1/monitor/statusreads bothup:truewithin two CheckIntervals of the fix landing, with no change to the front-door exempt sets unless (b) is ruled.Evidence
Demo box journal +
/srv/idss/config/machines/gateway/front-door.nix(commitsf57606c,ff99504); monitor status JSON above;control-plane/cmd/control-plane/{paperlesshealth,newslettershealth}.go;internal/clan/portroute.go:170-182. Filed from Ben's phase-9 demo session, 2026-09-16.swarm-claim host=matou-dev-server-01 run=24872
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
Ruling: option (a) — probe the two functional checks (Paperless
consume-and-find, Listmonk render-and-send) over the gateway-local address
the co-hosted container publishes (loopback
127.0.0.1:<ServePort>for agateway co-host, the mesh address for a device host), and keep the front-door
browser gate exactly as designed. No change to any
ExemptPathsset.Why (a), not (b): (b) would exempt the admin API paths
(
/api/token/,/api/lists,/api/campaigns/*,/api/health, …) at thefront door — a security-posture widening that opens those paths to anyone
holding the app credential (the one-way door ADR 0074/0074-weighing would have
to own). (a) matches how Files (
/status.php) and Community archive(whole
/api/*exempt) are already honest without widening the gate: thefunctional check calls the service locally, below the browser gate, exactly
where the deploy-time health gate already reaches it.
Why it is a two-way door: revertible by a later commit (the check's target
address is a derivation in the composition root, not a posture change or a
credential/data act), and provable by an existing-style test + probe.
What proves it:
(loopback
127.0.0.1:28981/:9010) vs a device-hosted one (mesh);GET /api/v1/monitor/statusreads bothdocument-archiveandnewslettersup:truewithin two CheckIntervals ofthe fix landing, with the front-door exempt sets unchanged.
Scope note: current placements of both ports are gateway co-host (the
portServeloopback route), so production wires the loopback branch; the meshbranch for a future device-hosted placement rides the same seam
(
serviceProbeBase) and is pinned by the seam test.close-report for #1503 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
convert-to.availablethrough the PUBLIC door, where Collabora answers false by design (post_allow) — a healthy install is refused after 36 attempts #1718