mesh-grants: the tool runner may publish its own node's machine event of a held seat (design 08 sign-in-page §4a) #364

Merged
mesh-tools merged 3 commits from feat/sign-in-page into main 2026-11-25 00:20:06 +00:00
3 Commits
Author SHA1 Message Date
jochen 0509270388 mesh-grants: test that node-uplink's machine event reaches no other node's membership or grant
Code review round 2: §4a says the grant and the membership cover the holder's own node's
subjects only. Add the negative row beside C-1's: a tool runner on node a, carrying networkmanager,
is neither listed for nor granted sign-in-asked.b. Passes already (onMachine substitutes the tool
runner's own node and nothing else), proving the fix does not overreach.

Builds: design 08 sign-in-page §4a
2026-11-25 01:13:51 +01:00
jochen ef8dd1207a mesh-grants: list the held seat's own-node machine event in the carried module's membership too
Code review round 1, C-1: granting the subject in the tool runner's NATS account (the previous
commit) is not enough, because the runtime's own mayPublish (node-tools/internal/bus/seat.go)
checks a module's membership (SeatTraffic.Publish), never the account permissions. SeatTrafficOf
leaves a held seat's machine event out of that list and defers to the held-seats' account grant,
which the membership check never reads. MembershipFor now lists it too, on the carried module's own
node alone. Golden file testdata/user-lists.json updated: the existing "pause" fixture (node-power's
machine event "paused") now also appears in its seat-traffic publish list.

Builds: design 08 sign-in-page C-1
2026-11-24 21:53:35 +01:00
jochen 501ff49abe mesh-grants: the tool runner publishes its own node's machine event of a seat a carried module holds
The grants part granted a held seat's events to the holder's own account only (nats.go "Seats it
holds"), so a module the tool runner carries (networkmanager's node-uplink, nftables'
node-packet-filter) had no way to say the machine's half of its own seat's events: SeatTrafficOf
explicitly leaves a machine event out of the tool runner's membership and defers to that rule,
which never runs for KindNodeTools. Grant it the same machineEvent-derived subject, for its own
node's machine only, mirroring step 3 of PermissionsFor's KindModule case.

Builds: design 08 sign-in-page DMC-1, Where
2026-11-24 21:24:42 +01:00