# Where must an instance refuse to propagate a traceparent across an organizational trust boundary, and what breaks when it doesn't **Date of Record:** 2026 November 27 **Scope:** Applies to federated agent meshes where two or more autonomous agent runtimes under distinct organizational control exchange work via A2A or MCP-over-HTTP and attempt to carry W3C Trace Context (`traceparent`/`tracestate`) end-to-end for observability and for warrant/audit correlation. Does not apply to single-tenant meshes where all agents share one trust root and one trace collector. ## Core Distinction The failure is not "traces get dropped." Dropped spans are benign. The failure is **trace-context laundering**: an inbound `traceparent` from a foreign trust domain is accepted, re-signed, and re-emitted as if the local agent's spans were continuous with the caller's trace — while the local agent has no cryptographic way to verify the caller's span claims. The result is a distributed trace that *looks* causally continuous but whose causal edges cross a boundary the identity layer never authorized. Trace correlation and trust correlation are two different graphs, and the invariant that matters is: **a trace edge may only be asserted across a trust boundary if the receiving domain independently attests the parent span's origin.** Most federated stacks conflate the two because `traceparent` is a plaintext header with no signature, and the receiving agent's OpenTelemetry SDK will happily continue any well-formed `trace-id`. ## What Was Observed A three-domain federation: Planner (org A), Executor (org B), Auditor (org C). Planner calls Executor via A2A with a `traceparent` whose `trace-id` is `4bf92f...`, `parent-id` = Planner's span. Executor's SDK continues the trace, emits child spans, and on completion hands off to Auditor with the same `trace-id` and Executor's span as parent. Auditor replays the trace to verify that the action it is auditing was actually initiated by the Planner warrant. The trigger condition is narrow: **the Executor's inbound warrant and the inbound `traceparent` are validated by different subsystems and are never cross-checked.** The warrant is a signed JWT carrying `warrant_id` and `iss: org-A`. The `traceparent` is an unauthenticated header. An attacker (or a buggy retry path in org B) presents a valid Executor warrant issued for a *different* Planner request, but sets `traceparent.trace-id` to the trace-id of a high-privilege Planner operation. Executor continues the trace. Auditor, on replay, sees a contiguous trace from Planner's privileged span through Executor's action and concludes the action was covered by that operation's warrant. The trace is the *only* artifact linking warrant to action, and the trace ID was attacker-chosen. The state transition trace: 1. Inbound request at Executor: `warrant.verify()` passes (signature valid, `iss` = org-A, `sub` = the *wrong* request). 2. `traceparent` parsed; `trace-id` accepted verbatim; SDK `tracer.start_as_current_span(..., context=extracted)` continues it. 3. Executor emits `child_of` span with `parent-id` = foreign span. No field records that the parent was unverified. 4. Outbound handoff to Auditor carries `trace-id` unchanged. 5. Auditor's replay engine keys on `trace-id` and reconstructs a causal chain that never existed. The invariant that was violated: `parent-id` in an outbound span asserted a causal dependency on a span whose origin the emitting domain had not attested. The trace graph gained an edge the identity graph did not have. ## Condition of Validity Continuing a foreign `traceparent` is only sound when at least one of the following holds: - The receiving domain can verify a signature over the `traceparent` binding `trace-id`/`parent-id` to the caller's warrant `jti` (e.g., a `tracestate` member carrying an Ed25519 signature over `(trace-id, parent-id, warrant_id)` verified against org-A's published key), **or** - The receiving domain does not use `trace-id` as an authorization or audit-correlation key — i.e., the trace is purely diagnostic and the audit chain is reconstructed from signed warrant `jti` links, not from span parentage. If neither holds, the correct behavior is **trace-context severance**: the receiving agent MUST start a *new* trace (new `trace-id`), emit the foreign `traceparent` as an attribute (`link.foreign_trace_id`, `link.foreign_parent_id`, `link.unverified = true`), and record an OTel *span link* rather than a parent-child edge. This preserves diagnostic correlation without asserting an unverified causal edge. The boundary is not "don't correlate"; it is "correlate via links, not via parentage, when the parent is unattested." ## Decision Boundary The decision is not per-request but per-(trust-domain-pair, direction). Concretely: - **Same trust root, same collector:** continue `traceparent` verbatim. Parentage is sound because the signing key is shared. - **Cross trust root, signed `tracestate` present and verifies:** continue `traceparent`, but set `tracestate` member `xfed.verified=true` and bind `warrant_id` into the span attributes so the Auditor can cross-check. - **Cross trust root, signature absent or fails:** sever. New `trace-id`, span link to foreign context, `xfed.verified=false`. Downstream replay engines MUST refuse to build a causal edge from a `link` — links are non-causal by definition. - **Cross trust root, but the receiving domain uses trace-id as an authz key:** hard fail. This is a configuration error; the agent must refuse to proceed rather than emit a laundered trace. The non-obvious part: the boundary is *not* "trusted vs. untrusted caller." A fully authenticated, fully authorized caller from org-A still requires severance if the `traceparent` itself is unsigned, because authentication of the *request* does not attest the *span claims* inside the header. Authentication and trace attestation are orthogonal. ## Operational Effect When severance is correctly applied, the Auditor's replay engine sees two traces joined by a `link` and a `warrant_id` attribute, and can reconstruct causality from the signed warrant chain rather than from span parentage. Trace fan-out increases (one logical operation becomes N traces across N domains), which is the cost. Query tooling must join on `warrant_id`, not `trace_id`. When severance is *not* applied — the observed failure — the trace graph silently acquires unverified edges, and any downstream consumer that treats `trace-id` as an authorization or audit-correlation key (replay engines, SLO attribution, incident blame assignment, warrant-coverage checks) inherits the forgery. The failure is silent because every individual span is well-formed and every signature check on the *request* passes; only the cross-graph invariant is violated. Detection requires a validator that, for every parent-child edge crossing a domain attribute, checks that the child's domain either shares a trust root with the parent's domain or carries a verified `xfed` signature — a check almost no OTel pipeline performs by default. ```python from dataclasses import dataclass from typing import Optional class TraceContextLaunderingError(RuntimeError): """Raised when a foreign traceparent would create an unverified causal edge across an organizational trust boundary.""" @dataclass(frozen=True) class TraceContext: trace_id: str parent_id: str trust_domain: str warrant_id: Optional[str] = None xfed_signature: Optional[str] = None # signature over (trace_id, parent_id, warrant_id) @dataclass(frozen=True) class LocalDomain: name: str trust_root: str verifier: object # callable(sig, payload) -> bool def admit_inbound_trace( inbound: TraceContext, local: LocalDomain, inbound_trust_root: str, uses_trace_id_as_authz: bool, ) -> TraceContext: same_root = inbound_trust_root == local.trust_root if same_root: return inbound # parentage sound; continue verbatim if inbound.xfed_signature is not None: payload = f"{inbound.trace_id}:{inbound.parent_id}:{inbound.warrant_id}" if local.verifier(inbound.xfed_signature, payload): return inbound # attested cross-domain edge is legal # Unsigned or failed-signature foreign context. if uses_trace_id_as_authz: # Continuing would launder an unverified edge into an authz key. raise TraceContextLaunderingError( f"refusing to continue foreign trace {inbound.trace_id} from " f"domain {inbound.trust_domain}: unsigned traceparent and local " f"domain uses trace-id as authorization key" ) # Sever: new trace, preserve foreign context as a non-causal link. severed = TraceContext( trace_id=_new_trace_id(), parent_id=_new_span_id(), trust_domain=local.name, warrant_id=inbound.warrant_id, xfed_signature=None, ) # Caller MUST emit a span link to (inbound.trace_id, inbound.parent_id) # with attribute xfed.verified=false, never a parent-child edge. return severed def _new_trace_id() -> str: import secrets return secrets.token_hex(16) def _new_span_id() -> str: import secrets return secrets.token_hex(8) ```