front door: strip inbound X-Idss-Identity on service routes' exempt paths (header-trusting services) #1167
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1167
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?
What
The front door must strip inbound
X-Idss-Identityon each service route's client-protocol EXEMPT paths, not only on the ungated portal route.Why (found while porting Grist, #1166)
The data-collections port (Grist) is the first catalogue service that TRUSTS the front door's identity header — it rides forwarded-header auth (
GRIST_FORWARD_AUTH_HEADER = X-Idss-Identity) because grist-core's own OIDC needs a full-edition activation key (ruled on #1166 under ADR 0174).Today (
internal/clan/frontdoor.go):forward_authandcopy_headers X-Idss-Identity, which overwrites any client-supplied value with the gate's verified one — safe;header_up -X-Idss-Identity, #1094) — safe;renderRoute, thehandle @<slug>_exempt { ... }block) reverse-proxies straight through with no strip. For every prior port that was harmless (Forgejo/Nextcloud/etc. authenticate exempt API paths with their OWN tokens and ignore the header). For a header-trusting service like Grist, a public caller hittinghttps://data-collections.<apex>/api/...could forgeX-Idss-Identityand be trusted as any user.This gap is not live today: these container ports are all gated out of P4-S2 selection (
provisionCannotDeploy), so no public route yet carries their exempt paths. But the front-door routing work that makes them selectable MUST close it, or it ships the spoofing gap.Proposed fix
In
renderRoute's exempt handler (before/insiderenderProxy), emitheader_up -X-Idss-Identity(reuse theidentityHeaderconst already in the file), so an exempt-path request reaches the backend with no caller-supplied identity — the same disciplinerenderPortalRoutealready applies. Add a frontdoor render seam test asserting the exempt handler strips it.Ticket found while working
#1166 (data-collections / Grist port). The port itself does not need the strip yet (gated out of selection); this arms the routing work.
swarm-claim host=elitebook-distributed-server-03 run=16658
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1167 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
mmctl --local roles system-admin <user>for operators androles memberon revoke (sign-in already OIDC; Team Edition has no claim-to-role mapping) #1543