Phase A — Sessions that end: revocation cascade and egress counter #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part 1 of 3 of the sessions/device-roster plan (14 Sep 2026). Fixes: signing a session out on one device left the device connected and counted elsewhere.
Design
sidin access, identity and shard tokens; identityauthenticate()refuses revoked sessions (SESSION_REVOKED) for access tokens./api/admin/session-revocationsto each shard (DIRECTORY_TOKEN bearer + identity-signedtyp:'revocations'JWT) before every pull and at once after every revoke; whole window (REVOCATION_WINDOW_DAYS8), idempotent, coalesced with one queued follow-up.revoked_sessions, onesessionRefused()predicate for HTTP, upgrade,/auth/session,/auth/joinand the message path; closes with 4005WS_CLOSE_SIGNED_OUT; a pre-sidtoken gets 4005 too.recoverIdentitySession().account_egress_daily,GET /api/admin/egress,egresson the admin account route,nectenda_account_egress_30d_bytes,/api/healthegressHot+ Kuma keyword monitor.Checkpoint
pnpm -r typecheck,pnpm test,pnpm lint, mirror--check/api/admin/egressanswers;/api/health"egressHot":[]; Kuma monitor green; floor=1 turns it red; revertLanded as
934d15eand deployed 14 September 2026 (identity → eu1 → plugin into both local vaults).pnpm -r typecheck,pnpm test(803 unit tests),pnpm lint, mirror--checkApplied migration 4) → shard (Applied migration 5,6) → plugin (shaa77b028c…, verified byte-identical to source)Sessions signed out received:12 added:12 closed:0); identity/api/healthrevocationsOk:trueGET /api/admin/egressandegresson the admin account route answer;/api/healthshows"egressHot":[]; Kumasync eu1 egressadded and published;EGRESS_ALERT_FLOOR_BYTES=1with a synthetic row turned it red, revert cleared it, env file restored byte-identicalPrevious pins kept as
/srv/identity/.env.before-934d15eand/srv/nectenda/.env.before-934d15e.Follow-up deployed: eu1 now on
7f88efa. A vault still on the old plugin was refused with 4005 once a second (accepted upgrade resets its backoff); pre-sid tokens are now refused at the handshake and back off to 30 s — seen live: 3 refusals in the minute after the deploy instead of ~60. Identity stays on934d15e(dff14c2is docs only).Live check done by the user: signing the other device out from Signed-in devices signed it out within a minute, and signing back in on itself came back cleanly. Phase A checkpoint complete.