gobridge

0001 — Reserved-header trust model and out-of-band signaling

Status: accepted Date: 2026-07-03 Deciders: GoBridge core

Context

Bridge internals need to steer routing per message: a DLQ redrive must replay a message to the one binding that failed, not fan it out to every binding on the route. The obvious channel is a header — set x-bridge.route-override on the message and let the route runner read it.

That channel is unsafe. A message arriving from a transport is external input. If routing honored a header on inbound traffic, any producer could set x-bridge.route-override and steer its message to an arbitrary binding, bypassing the route’s filters and destinations. Headers cross the trust boundary; routing decisions must not depend on them.

All bridge-internal headers share the reserved prefix x-bridge. (domain/messaging/headers.go), including HeaderRouteOverride = "x-bridge.route-override" (headers.go).

Decision

Strip every reserved header at pipeline ingress, then re-stamp trusted signals out-of-band from typed struct fields — never from the wire.

Consequences

Rejected alternatives