Skip to content

security: sign registry registration — proof-of-possession (PPA-003)#37

Merged
matthew-pilot merged 1 commit into
mainfrom
security/sign-registration
Jul 24, 2026
Merged

security: sign registry registration — proof-of-possession (PPA-003)#37
matthew-pilot merged 1 commit into
mainfrom
security/sign-registration

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Registration was the only key-establishing registry operation with no signature, while heartbeat/deregister/resolve all sign. This lets anyone reaching the registry claim a node_id / repoint a victim's endpoint (key-directory poisoning).

Fix: RegisterWithKeyOpts (the single builder emitting a public_key; RegisterWithKey funnels through it) attaches a signature over register:<listenAddr>:<publicKeyB64>, proving possession of the private key for the registered public_key.

  • Challenge binds public_key (defeats poisoning) and listen_addr (hardens the re-registration endpoint-repoint vector).
  • Server-verifiable before node_id assignment (node_id is not an input).
  • Additive & backward-compatible: only an optional signature field is added, best-effort when a signer is configured; keyless/anonymous registration unchanged. An older server that ignores the field still accepts registration.

Separate coordinated work (not here): server-side enforcement of this signature (rendezvous repo/deploy) and registry-TLS-by-default transport (would sever daemons from the current plaintext :9000 registry until the server serves TLS).

Tests: TestRegisterWithKeyOptsCarriesProofOfPossession, ...ReRegistrationBindsPublicKey, ...NoSignerOmitsSignature. go build ./... && go test ./registry/... green.

🤖 Generated with Claude Code

RegisterWithKeyOpts (the single builder emitting a public_key; RegisterWithKey
funnels through it) now attaches a signature over "register:<listenAddr>:<publicKeyB64>",
proving the submitter holds the private key for the registered public_key —
matching the existing signed heartbeat/deregister/resolve operations.

The challenge binds the public_key (defeats key-directory poisoning) and the
listen_addr (hardens the re-registration endpoint-repoint vector), and is
verifiable by the server before node_id assignment (node_id is not an input).
Additive and backward-compatible: only an optional signature field is added,
best-effort when a signer is configured; keyless/anonymous registration is
unchanged. Server-side enforcement and registry-TLS-by-default are separate
coordinated changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@matthew-pilot
matthew-pilot merged commit efbd5fb into main Jul 24, 2026
11 checks passed
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.

3 participants