diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-25 17:43:28 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-25 17:43:28 +0200 |
| commit | 3f3c67a4aff7b800c271e88e2bc5e5294b010fb9 (patch) | |
| tree | 7280157a5921605b95fb8d1640f4b656067c8136 /packages/meshbay-common/src/meshbay_common | |
| parent | bce962c39fcb2d124506e33f77c3ca9082f145dd (diff) | |
| download | meshbay-3f3c67a4aff7b800c271e88e2bc5e5294b010fb9.tar.gz | |
feat(protocol): MNP 4.0 flag day for the node-audience token (B2)
The node-audience token (previous commit) is a change to what a peer must
present, so it is a MAJOR per the versioning rule (§5.6): a pre-4.0 client
presents its hub session token and a 4.0 node refuses it, and there is no
compatibility branch, because leaving one would keep a hub credential reachable
by every node (C6's lesson). So the floor moves with the version.
- MNP_VERSION 3.4 -> 4.0 and MNP_MIN_SUPPORTED 3.0 -> 4.0 (meshbay_common);
transport.js MNP_V/MNP_V_MIN -> 4.0 to match.
- MIN_CLIENT_VERSION 0.13.0 -> 0.16.0 so a stale desktop client is told to
update before connecting rather than meeting a handshake refusal it cannot
read; the browser reloads this build from the hub.
- Regenerate tests/golden/dispatch.json: the only change is the `v` the node
stamps on outbound messages, 3.4 -> 4.0 (56 cases, v field only).
- Document the split and the flag day: MESHBAY_DESIGN.md §5.2 (the handshake
token is the MNP-audience token), §5.6 (the 4.0 flag day), register E10 and
decision 23; MESHBAY_NODE_PROTOCOL.md §6.3 (authorize_token binds MNP_AUD)
and the wire-version banner.
Deploy is coordinated and atomic (common+hub+node+SPA together); a live
browser-to-node validation and the deploy itself remain. common (173), node
(1489, the pre-existing test_cli_golden argparse/prog artifact aside) and hub
(1471) suites all green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common')
| -rw-r--r-- | packages/meshbay-common/src/meshbay_common/__init__.py | 10 | ||||
| -rw-r--r-- | packages/meshbay-common/src/meshbay_common/handshake.py | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/__init__.py b/packages/meshbay-common/src/meshbay_common/__init__.py index 216a18f..842c52d 100644 --- a/packages/meshbay-common/src/meshbay_common/__init__.py +++ b/packages/meshbay-common/src/meshbay_common/__init__.py @@ -241,5 +241,13 @@ __version__ = "0.16.0" # `invite_link_result` and `invite_cancel`, a code bound to no account until it # is redeemed. Additive in the same way — a 3.3 node answers `unknown message # type`, and no client can hold a link code for a node that could not issue one. -MNP_VERSION = "3.4" +# +# 4.0 (2026-09-25) is a MAJOR — a change to what a peer must *present*, not an +# additive message (§5.6). A member now authenticates to a node with a +# short-lived MNP-audience token (aud=MNP_AUD), never its hub session token: the +# node operator holds whatever is presented, and the session token opens the hub +# API. A pre-4.0 client presents the session token and is refused at the +# handshake — there is no compatibility branch, because leaving one would keep +# the disclosure reachable on every node. So the floor moves with it. +MNP_VERSION = "4.0" MHP_VERSION = "0.1" diff --git a/packages/meshbay-common/src/meshbay_common/handshake.py b/packages/meshbay-common/src/meshbay_common/handshake.py index 2393df1..dedfeb1 100644 --- a/packages/meshbay-common/src/meshbay_common/handshake.py +++ b/packages/meshbay-common/src/meshbay_common/handshake.py @@ -85,7 +85,11 @@ CHALLENGE_PREFIX = b"meshbay:mnp:challenge:v1" # has no vocabulary to understand — or serving it outside every cap the operator # set, which makes the caps decoration. Neither is honest, so it is refused # here, with a code and a sentence. -MNP_MIN_SUPPORTED = "3.0" +# 4.0 (2026-09-25): a member authenticates with an MNP-audience token, not the +# hub session token (MNP_VERSION note). A pre-4.0 peer presents the session +# token, which this node now refuses — so the floor moves to 4.0 rather than +# leaving a branch that would keep a hub credential reachable by every node. +MNP_MIN_SUPPORTED = "4.0" ROLE_CLIENT = "client" ROLE_NODE = "node" |