A login session is the account's own, of class user, read at accept (hq ADR 0272) #71

Merged
mesh-admin merged 1 commits from feat/272-the-session-is-a-users-read-at-accept into main 2026-10-09 12:04:18 +00:00
Contributor

Follow-up to #70 (review of hq ADR 0272).

  • logind's record decides. The cgroup names a scope; the engine now takes it as a login session only when /run/systemd/sessions/<id> says UID is this account's, CLASS=user (not a greeter's, not the user manager's), and SCOPE is this very scope. No record, or one that says otherwise, is no session.
  • Read at accept. The session is read right after the namespaces, before slots and before the line, so the peer is judged as it was when it connected. (SO_PEERPIDFD would pin the process itself; not used, as it needs a newer kernel than every node is known to run.)
  • README updated.

Tests (fail before): TestALoginSessionIsAUsersByItsOwnRecord — session-9.scope with a user record is taken; x.scope, a different uid, another account's session, a greeter's, a record naming another scope, no record, a path with dots are not. TestTheSessionIsReadBeforeTheLine — namespaces, then session, then forward. merge-check.sh passes locally.

What this does not change: a login session includes every process started in it, so the rule keeps services, not same-account processes, from being the terminal (hq #248 says so).

Follow-up to #70 (review of hq ADR 0272). - **logind's record decides.** The cgroup names a scope; the engine now takes it as a login session only when `/run/systemd/sessions/<id>` says `UID` is this account's, `CLASS=user` (not a greeter's, not the user manager's), and `SCOPE` is this very scope. No record, or one that says otherwise, is no session. - **Read at accept.** The session is read right after the namespaces, before slots and before the line, so the peer is judged as it was when it connected. (SO_PEERPIDFD would pin the process itself; not used, as it needs a newer kernel than every node is known to run.) - README updated. **Tests** (fail before): `TestALoginSessionIsAUsersByItsOwnRecord` — `session-9.scope` with a user record is taken; `x.scope`, a different uid, another account's session, a greeter's, a record naming another scope, no record, a path with dots are not. `TestTheSessionIsReadBeforeTheLine` — namespaces, then session, then forward. `merge-check.sh` passes locally. **What this does not change:** a login session includes every process started in it, so the rule keeps services, not same-account processes, from being the terminal (hq #248 says so).
mesh-admin added 1 commit 2026-10-09 11:55:54 +00:00
A login session is the account's own, of class user, read at accept (hq ADR 0272)
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
bf3f45e769
The cgroup names a scope; only logind's record of it says whose session it
is. The engine now takes a session only when /run/systemd/sessions/<id>
says it is this account's (UID), of class user (not a greeter's or the
user manager's), and of this very scope. And it reads the session the
moment the connection is accepted, with the namespaces, before the line,
so the peer is judged as it was when it connected.

Tests: session-9.scope with a user record is taken; x.scope, a different
uid, another account's session, a greeter's, a record naming another
scope, no record, and a path with dots are not; the session is read
before the line is forwarded.
Author
Contributor

Delivery novox/mesh-host@bf3f45e76902 — delivered since 2026-10-09T12:08:21Z

Delivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-host
  • ace: receives mesh-host
  • g14: receives mesh-host
  • novox: receives mesh-host
  • shanks: receives mesh-host

Machines

  • mesh-host on ace: passed — healthy 3 times over 2m40s
  • mesh-host on the rest running it: sent

Transitions

  • 2026-10-09 11:56 (new) → proposed (announced): novox/mesh-host#71's head announced
  • 2026-10-09 11:58 proposed → checked (checked): the verdict names this commit
  • 2026-10-09 11:58 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-09 12:04 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-09 12:04 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path
  • 2026-10-09 12:08 delivering → delivered (done): its walk is done: every machine of its deploy plan passed, or was left as its policy says

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-host@bf3f45e76902` — **delivered** since 2026-10-09T12:08:21Z **Delivery plan** — builds mesh-host → ace, g14, novox, shanks; no bus step - tier 0: mesh-host - ace: receives mesh-host - g14: receives mesh-host - novox: receives mesh-host - shanks: receives mesh-host **Machines** - mesh-host on ace: passed — healthy 3 times over 2m40s - mesh-host on the rest running it: sent **Transitions** - 2026-10-09 11:56 (new) → proposed (announced): novox/mesh-host#71's head announced - 2026-10-09 11:58 proposed → checked (checked): the verdict names this commit - 2026-10-09 11:58 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-09 12:04 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-09 12:04 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path - 2026-10-09 12:08 delivering → delivered (done): its walk is done: every machine of its deploy plan passed, or was left as its policy says The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
Author
Contributor

Merge check at bf3f45e7

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host)
  • mesh/repo-check: PASS — its merge-check.sh passed

Delivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-host
  • ace: receives mesh-host
  • g14: receives mesh-host
  • novox: receives mesh-host
  • shanks: receives mesh-host

Run by the build seat on g14 as build-1791546960664908867 (builds --log build-1791546960664908867).

--- the gate: mesh-host
mesh-host: ok
long-running resources without health: 0
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-09T11:53:53Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-09T11:53:53Z

machines:
  - a machine (f35): composes
  - holds mesh-dns-resolver (idt): composes
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
  - a machine (yvbpsm): composes

a merge would rebuild 1 module(s) in 1 tier(s): mesh-host
--- its merge-check.sh (go toolchain)
go: downloading git.novox.be/novox/mesh-sdk/go v0.1.9
ok  	github.com/novox/mesh-host/cmd/mesh-bootstrap	1.011s
ok  	github.com/novox/mesh-host/cmd/mesh-host	5.264s
ok  	github.com/novox/mesh-host/examples	1.018s
ok  	github.com/novox/mesh-host/internal/accounts	1.031s
ok  	github.com/novox/mesh-host/internal/apply	3.027s
ok  	github.com/novox/mesh-host/internal/bootstrap	1.996s
ok  	github.com/novox/mesh-host/internal/bundle	1.013s
ok  	github.com/novox/mesh-host/internal/declaration	1.044s
ok  	github.com/novox/mesh-host/internal/firewall	1.727s
ok  	github.com/novox/mesh-host/internal/identity	1.591s
ok  	github.com/novox/mesh-host/internal/image	1.014s
ok  	github.com/novox/mesh-host/internal/inventory	1.023s
ok  	github.com/novox/mesh-host/internal/link	10.473s
ok  	github.com/novox/mesh-host/internal/liveness	2.561s
ok  	github.com/novox/mesh-host/internal/meshcli	1.393s
ok  	github.com/novox/mesh-host/internal/network	1.227s
ok  	github.com/novox/mesh-host/internal/outward	1.225s
ok  	github.com/novox/mesh-host/internal/profile	1.548s
ok  	github.com/novox/mesh-host/internal/reachable	1.026s
ok  	github.com/novox/mesh-host/internal/store	1.082s
ok  	github.com/novox/mesh-host/internal/system	1.010s
ok  	github.com/novox/mesh-host/internal/tunnel	1.012s
ok  	github.com/novox/mesh-host/internal/units	1.006s
ok  	github.com/novox/mesh-host/internal/upgrade	1.033s
ok  	github.com/novox/mesh-host/internal/witness	1.487s
ok  	github.com/novox/mesh-host/packaging	1.007s
?   	github.com/novox/mesh-host/rootsearch	[no test files]
ok  	github.com/novox/mesh-host/validate	1.007s
**Merge check** at `bf3f45e7` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host) - `mesh/repo-check`: **PASS** — its merge-check.sh passed **Delivery plan** — builds mesh-host → ace, g14, novox, shanks; no bus step - tier 0: mesh-host - ace: receives mesh-host - g14: receives mesh-host - novox: receives mesh-host - shanks: receives mesh-host Run by the build seat on g14 as `build-1791546960664908867` (`builds --log build-1791546960664908867`). ``` --- the gate: mesh-host mesh-host: ok long-running resources without health: 0 files asking for a setting without saying whether it is trusted: 0 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-09T11:53:53Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-09T11:53:53Z machines: - a machine (f35): composes - holds mesh-dns-resolver (idt): composes - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes - a machine (yvbpsm): composes a merge would rebuild 1 module(s) in 1 tier(s): mesh-host --- its merge-check.sh (go toolchain) go: downloading git.novox.be/novox/mesh-sdk/go v0.1.9 ok github.com/novox/mesh-host/cmd/mesh-bootstrap 1.011s ok github.com/novox/mesh-host/cmd/mesh-host 5.264s ok github.com/novox/mesh-host/examples 1.018s ok github.com/novox/mesh-host/internal/accounts 1.031s ok github.com/novox/mesh-host/internal/apply 3.027s ok github.com/novox/mesh-host/internal/bootstrap 1.996s ok github.com/novox/mesh-host/internal/bundle 1.013s ok github.com/novox/mesh-host/internal/declaration 1.044s ok github.com/novox/mesh-host/internal/firewall 1.727s ok github.com/novox/mesh-host/internal/identity 1.591s ok github.com/novox/mesh-host/internal/image 1.014s ok github.com/novox/mesh-host/internal/inventory 1.023s ok github.com/novox/mesh-host/internal/link 10.473s ok github.com/novox/mesh-host/internal/liveness 2.561s ok github.com/novox/mesh-host/internal/meshcli 1.393s ok github.com/novox/mesh-host/internal/network 1.227s ok github.com/novox/mesh-host/internal/outward 1.225s ok github.com/novox/mesh-host/internal/profile 1.548s ok github.com/novox/mesh-host/internal/reachable 1.026s ok github.com/novox/mesh-host/internal/store 1.082s ok github.com/novox/mesh-host/internal/system 1.010s ok github.com/novox/mesh-host/internal/tunnel 1.012s ok github.com/novox/mesh-host/internal/units 1.006s ok github.com/novox/mesh-host/internal/upgrade 1.033s ok github.com/novox/mesh-host/internal/witness 1.487s ok github.com/novox/mesh-host/packaging 1.007s ? github.com/novox/mesh-host/rootsearch [no test files] ok github.com/novox/mesh-host/validate 1.007s ```
mesh-admin merged commit 512b0edb02 into main 2026-10-09 12:04:18 +00:00
mesh-admin deleted branch feat/272-the-session-is-a-users-read-at-accept 2026-10-09 12:04:18 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-host#71