Repository navigation
Conversation
…very team connect --e2ee skipped the plaintext-address rule and the sync engine exempted every age-v1 binding (#1019), while pull and set-endpoint applied it, so the same address was accepted or refused depending on the command. The rule now decides by the address alone, before any request, for every command and every team: https://, or http:// to a local, LAN or Tailscale address (loopback, RFC1918, ULA, link-local, 100.64/10, *.ts.net). Sealed message bodies do not cover the team id, the endpoint path or the sync metadata, which plaintext http to an internet address exposes on the way. The refusal no longer offers --e2ee as a way past the rule and says it applies to encrypted teams too. A binding recorded under the old exemption is refused by the engine with that reason and the set-endpoint command that moves it. Refs #2067
…with the reason and the way out A binding the earlier age-v1 exemption let connect record: sync start fails, remote status shows the refusal and the set-endpoint command, and set-endpoint to an accepted address succeeds.
fujibee
force-pushed
the
fix/e2ee-endpoint-pull-set-endpoint
branch
from
November 29, 2026 15:50
ea82b34 to
b4e6172
Compare
This branch has not been deployed
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.
Refs #2067
What was wrong
The plaintext-address rule gave different answers for the same address depending on the command:
connect --e2eeskipped the rule, and the sync engine exempted every age-v1 binding. This exemption came from fix(remote): connect --e2ee actually bypasses the plaintext-address check #1019.pullandset-endpointapplied the rule to every team.So an encrypted team could be connected to
http://agmsg.example, but could not be pulled onto a second machine from that address, or moved to it.Change
The rule is now decided by the address alone, before any request, for every command (
connect,pull,set-endpoint, and every sync cycle) and every team, encrypted or not:https://, orhttp://to a local, LAN or Tailscale address: loopback, 10/8, 172.16/12, 192.168/16, link-local,fc00::/7,100.64/10,*.ts.net. ZeroTier networks normally use RFC1918 ranges.http://to any other address. Nothing crosses the network before the refusal.The reason for removing the age-v1 exemption: sealed message bodies do not cover the team id, the endpoint path (which can carry a capability token), or the sync metadata. Over plaintext
http://to an internet address, all of that can be read or changed on the way.In detail:
cmd_connect(scripts/remote.sh): validates the endpoint whether or not--e2eeis given.connectedBinding(scripts/internal/remote-sync.mjs): no longer exempts age-v1, and reports the validator's own reason plus theset-endpointcommand that moves the team. Before, it had a shorter copy of the allowlist that left outfe80::/10and the Tailscale forms.--e2eeas a way past the rule, and says the rule applies to encrypted teams too.pullandset-endpoint: unchanged. They already refused up front.Upgrade effect. An age-v1 team that an earlier version connected to an internet
http://address stops syncing. The engine refuses its binding before any request.remote statusshowslast fatal: connected team endpoint is refused: …with the reason and the way out:remote.sh set-endpoint --endpoint <url> <team>to anhttps://address or a local/tailnet one.sync starton such a team reports only that the engine did not become ready, as it already does for every fatal start.No new environment variable, flag or process spawn.
Tests
tests/test_endpoint_table_node.bats: the shared verdict table now runs throughconnectedBindingtwice, as a plain binding and as an age-v1 one. On main, the 42 refuse rows fail for age-v1.tests/test_remote.bats:connect --e2eetohttp://0.0.0.0:1is refused with the reason, never reaches the network, and writes no binding. This replaces the fix(remote): connect --e2ee actually bypasses the plaintext-address check #1019 test that expected it to pass the check. Fails on main.--e2eeis removed.http://address:sync startfails,statusshows the reason andset-endpoint, andset-endpointto an accepted address works. Fails on main.pullof an age-v1 team andset-endpointof an age-v1 team are refused the same address before any request.tests/test_endpoint_scheme.bats: the refusal must not offer--e2ee. Fails on main.Passing locally:
node --test tests/remote_sync_engine.test.mjs: 161 pass.github/scripts/check-*.sh: all passReal machine
macOS:
node scripts/internal/validate-endpoint.mjs <url>).connectedBindingcalled on an age-v1 binding tohttp://agmsg.example:8787.Each gave the refusal text above.