Skip to content

feat!: evidence leaves a plane only over a unix socket or TLS - #98

Merged
karauda merged 5 commits into
mainfrom
feat/s24-c
Nov 10, 2026
Merged

karauda merged 5 commits into
mainfrom
feat/s24-c

Conversation

@karauda

@karauda karauda commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Evidence now leaves a plane only over a unix socket whose peer the plane checks, or over TLS (ADR-0080). Before, the collector's bearer credential went in plaintext to whoever held a loopback port while the collector was down.

  • An http:// export.endpoint and export.allow_plaintext: true are refused at load. Each refusal names 0.17 and the two ways that remain: unix:///path with export.collector_uid, or https://. export.allow_plaintext stays a known key that is refused, not an unknown one.
  • A unix export socket's path is bounded at 103 bytes, as listener.socket is.
  • The OpenTelemetry exporter refuses http even when built directly. otel.Options.AllowPlaintext is gone.
  • collect --listen takes unix:///path only, and the collector refuses a TCP listener handed to it.
  • dev runs its collector on a socket in a directory of its own under TMPDIR (0700, its own uid), and refuses a TMPDIR too long for one.
  • doctor drops the plaintext warning and names an https endpoint as export over TLS.
  • Every test rig and example that ran a collector over TCP now uses a unix socket; https keeps its tests.

Pages: ADR-0080 (new), pointers in ADR-0014, 0020 and 0072, the generated configuration reference, cli, dev, five guides, the threat model, privacy, benchmarks (the published run used loopback TCP), status, CHANGELOG (Breaking, with the upgrade step).

Verified:

  • Load refusals through the exported loader: http, the old key, a 104-byte path refused and 103 loading, https accepted.
  • collect and the collector refuse TCP. The exporter refuses http built directly. The exporter's own client sends nothing to a collector whose certificate the system does not trust.
  • Each of these mutants fails a test:
    • http accepted again;
    • the 103 bound dropped;
    • collect binding TCP;
    • the collector's TCP guard off;
    • allow_plaintext accepted;
    • any scheme with a host accepted, at load or in the exporter;
    • dev's collector uid off by one;
    • dev's socket-path estimate set to zero;
    • certificate checks off on the exporter's own client.
  • Test binaries for adapters/otel, bench, both commands, both examples with tests, internal/docscheck, configdoc, internal/gateway/e2e, internal/gatewayconfig, internal/metrics, internal/recovery, internal/scenario, internal/trailfile, internal/console, internal/core/approval and internal/core.
  • make vet (GOOS=windows included), check-imports, check-brand, check-sizes, golangci-lint.

Not verified or not covered:

  • The Python client's end-to-end test, scripts/check-mcp-client.sh and the hook bridge's qualification plane.sh were edited for the unix collector and traced, not run here; CI runs the MCP client check.
  • dev and collect build unix:// + path while the plane percent-decodes the URL: a TMPDIR holding %41 binds one path and dials another. That fails closed, since evidence never arrives.
  • dev's TMPDIR advice is added to every export.endpoint refusal.
  • collect --listen has no 103-byte bound of its own.
  • The redirect test does not reach the https own-client path.
  • Benchmarks were not re-measured.

docs-impact: 0 uncovered surfaces; the frozen paths are the four ADRs, the ADR index and status. The suspect pages were searched for http export, allow_plaintext, a TCP collect --listen and loopback collectors; only pdp.allow_plaintext (another feature) remains.

The collector's bearer credential went in plaintext to whoever held a
loopback port while the collector was down. A plane now refuses an
http:// export endpoint and export.allow_plaintext: true, each naming
0.17 and the two ways that remain: unix:/// with export.collector_uid,
or https://. A unix export socket's path is bounded at 103 bytes, as the
listener socket is. The OpenTelemetry exporter refuses http when built
directly, and drops Options.AllowPlaintext. collect --listen takes a
unix socket only, and the collector refuses a TCP listener handed to it.
dev runs its collector on a socket in its own temporary directory, and
refuses, naming TMPDIR, a path too long for a socket. doctor no longer
warns about TCP and names an https endpoint as export over TLS.

Every test rig and example that ran a collector over TCP now uses a
unix socket; https keeps its tests.

ADR-0080 records the decision; ADR-0014, 0020 and 0072 point to it.

BREAKING CHANGE: an http:// export.endpoint, export.allow_plaintext: true
and collect --listen host:port are refused; move to a unix socket with
export.collector_uid, or to an https collector.

Signed-off-by: Konrad Karauda <konrad@karauda.com>
…bound

A plane builds its https exporter with no client of the caller's, and
every https test handed in the test server's trusting client, so turning
off certificate checks on the exporter's own client passed the suite. A
test now points that client at a collector the system does not trust and
requires that it receives nothing.

dev's estimate of the longest socket path os.MkdirTemp can draw was
tested only far past the bound; a test now holds it at 104 bytes refused
and 103 accepted.

Signed-off-by: Konrad Karauda <konrad@karauda.com>
Signed-off-by: Konrad Karauda <konrad@karauda.com>
…ger warns

Signed-off-by: Konrad Karauda <konrad@karauda.com>
Signed-off-by: Konrad Karauda <konrad@karauda.com>
@karauda
karauda requested a review from a team November 10, 2026 21:11
@karauda
karauda requested a review from a team as a code owner November 10, 2026 21:11
@karauda
karauda merged commit c78864b into main Nov 10, 2026
11 of 12 checks passed
@karauda
karauda deleted the feat/s24-c branch November 10, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant