Repository navigation
Sign each Connector with the agent's endpoint key - #268
Merged
Merged
Conversation
The agent now signs each Connector it publishes with its iroh endpoint key, so the control plane can check that the endpoint id in the Connector status is held by the agent that wrote it. Key changes: - Add optional publicKey.binding.signature to the Connector connection details, omitted when unset - Sign "datum-connector-binding/v1\n<connector uid>\n<endpoint id>" with the endpoint's ed25519 secret key, base64 std encoded - Heartbeat and tunnel setup write the binding, and re-patch connection details when the binding is missing or differs from the expected one - Unit tests for the message format, verification, a wrong UID, and a fixed test vector
The heartbeat only re-sent connection details when they changed locally, so a binding the API server dropped, or one signed for a Connector UID that has since changed, stayed wrong until the agent restarted. Key changes: - Heartbeat reads the Connector back every 5 minutes, refreshes its UID and re-signs when the UID changes, and re-patches when the status lacks the binding it sent - While the binding keeps being dropped, the read-back interval doubles up to 1 hour, so an older control plane never causes a patch loop - A lease renew 404 forces a fresh Connector read and UID refresh - Warn once when a Connector has no UID instead of silently sending details without a binding - Tunnel setup remembers the binding it last sent per Connector UID and skips the patch while the read-back is unchanged since that send - Re-patch decisions are pure functions with unit tests for a missing binding, a stale UID, a dropped binding and a matching one
kevwilliams
approved these changes
Nov 28, 2026
kevwilliams
left a comment
Contributor
There was a problem hiding this comment.
The signature covers a versioned label plus Connector UID and endpoint ID, signed by that endpoint's own key, so it cannot replay onto another Connector.
privateip
approved these changes
Nov 28, 2026
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.
The control plane can now refuse to route to a Connector whose endpoint ID it can't tie to the agent that published it, and this change gives agents the proof. The agent signs each Connector's UID and endpoint ID with its endpoint key and writes the signature to Connector status. The operator side runs in production in count-only mode (datum-cloud/network-services-operator#990, released in v0.44.0), so routing stays as it is today.
What changes for users
Nothing visible. After updating, an agent's Connectors start reporting as verified. One agent can still serve Connectors in several projects, because it signs each one separately.
Older control planes
A control plane older than v0.44.0 drops the new field. The agent notices on read-back and retries with a growing interval, up to once an hour, so it never loops.
Testing
cargo test --workspacepasses (71 tests), on currentmain.