Conversation
The POST /v1/errors ingest handler trusted the SyncEnvelope's nodeId and reconciled whatever it named. The caller is already authenticated by mutual TLS, so the peer's identity is the verified client UUID; the envelope's own nodeId is redundant and spoofable. Reconcile under the authenticated caller UUID instead, and reject an envelope whose nodeId disagrees with it. The pin store keys peers by the same UUID the push side uses as nodeId, so honest peers are unaffected. Also bounds the ingest body at the same 1 MiB the other inter-node endpoints apply, so an oversized push cannot be decoded unbounded. Signed-off-by: woodsonl <65194841+woodsonl@users.noreply.github.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.
Description
The
POST /v1/errorsingest handler trusted theSyncEnvelope'snodeIdandreconciled whatever it named. The caller is already authenticated by mutual
TLS, so the peer's real identity is the verified client UUID. The envelope's
own
nodeIdis redundant and can name another node.This reconciles under the authenticated caller UUID and rejects an envelope
whose
nodeIddisagrees with it. The pin store keys peers by the same UUID thepush side uses as
nodeId, so honest peers are unaffected; the mismatch caseonly fires for a body that names someone else.
The ingest body is also bounded at the same 1 MiB the other inter-node
endpoints apply, so an oversized push is refused before it is decoded.
Release intent
Changelog title
Error sync ingests under the authenticated peer identity
Changelog body
The error-sync endpoint now records an incoming snapshot under the identity of
the peer that authenticated, rather than the identity named in the request
body, and refuses a body that names a different peer. Oversized ingest bodies
are refused rather than decoded.
Bumps
Scope
Included: the caller-UUID reconciliation, the mismatch rejection, and the 1 MiB
body bound.
Excluded: the manager's local reconcile logic is unchanged; only the handler's
identity handling changes.
Validation
go build ./...andgo test ./...inservices/nvpair-errorsservices/nvpair-errors/peersync_test.gocovers a matching-nodeId ingestand a spoofed-nodeId rejection.
Risk
Low. A peer that already pushes its own
nodeIdis unaffected; the new 400only fires when the body names a peer other than the authenticated caller.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.jsonis written by automation — do not edit it by hand.