Repository navigation
feat!: evidence leaves a plane only over a unix socket or TLS - #98
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
http://export.endpointandexport.allow_plaintext: trueare refused at load. Each refusal names 0.17 and the two ways that remain:unix:///pathwithexport.collector_uid, orhttps://.export.allow_plaintextstays a known key that is refused, not an unknown one.listener.socketis.httpeven when built directly.otel.Options.AllowPlaintextis gone.collect --listentakesunix:///pathonly, and the collector refuses a TCP listener handed to it.devruns its collector on a socket in a directory of its own underTMPDIR(0700, its own uid), and refuses aTMPDIRtoo long for one.doctordrops the plaintext warning and names anhttpsendpoint as export over TLS.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:
collectand 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.collectbinding TCP;allow_plaintextaccepted;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/approvalandinternal/core.make vet(GOOS=windows included),check-imports,check-brand,check-sizes, golangci-lint.Not verified or not covered:
scripts/check-mcp-client.shand the hook bridge's qualificationplane.shwere edited for the unix collector and traced, not run here; CI runs the MCP client check.collectbuildunix://+ path while the plane percent-decodes the URL: aTMPDIRholding%41binds one path and dials another. That fails closed, since evidence never arrives.TMPDIRadvice is added to everyexport.endpointrefusal.collect --listenhas no 103-byte bound of its own.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 TCPcollect --listenand loopback collectors; onlypdp.allow_plaintext(another feature) remains.