design-15 S4a: adopted-track per-line user write path - #14
Merged
Conversation
This was referenced Jul 20, 2026
vpn-core users-admin gains plan_add/plan_remove (in-core, core-backed): each compiles a pending approval whose Plan is a redacted payload (op/line/user/credential SHA — never secret material) and whose Action binds the exact credential bytes. The approval executor renders the on-box `sb user add|del <line> <payload>` invocation, re-deriving the credential from the write-only store and failing closed when the bytes moved since approval. Also adds rotate: regenerate one protocol credential with a one-time reveal, preserving the write-only read model. Every on-line user carries the design-15 §5 derived name (u_<sha256(user|line_uuid)[:16]>) — the single join key for auth, auth_user routing, and per-user stats. A successful remove drops the server-side binding so the read model stops claiming the user belongs on the line. Managed-track user writes (whole-config re-render) are explicitly rejected with a pointer to the later slice.
lr00rl
force-pushed
the
feat/design-15-line-users
branch
from
July 22, 2026 13:29
0b39e33 to
9812a3c
Compare
lr00rl
marked this pull request as ready for review
July 22, 2026 13:40
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.
Summary
design-15 D3 server slice (adopted track first; managed re-render deferred per D6):
users-admin.plan_add/plan_remove(in-core, core-backed — same pattern as netguard's plan): compiles a pending approval.Planis redacted (op/line/user/protocol/credential SHA — no secrets);Actionbinds the exact credential SHA-256.applyScriptForroutessingbox-lineuserapprovals to a script that re-derives the credential from the write-only store and fails closed on any drift since approval, then runssb user add|del <line> <payload>(the 233boy fork's atomic jq +sing-box check+ rollback + restart path).users-admin.rotate: regenerates one protocol credential, one-time reveal, write-only read model preserved.namerule (design-15 §5):u_<sha256(user_id|line_uuid)[:16]>— single join key for auth,auth_userrouting, and per-user stats.removedrops the server-side binding; managed lines are explicitly rejected with a pointer to the later slice.Stacked on #13 (linemeta). Plugin manifest/UI wiring is the next slice.
Verification
gofmt/go vetclean;go test ./...all ok (server pkg 20s)Refs LatticeNet/lattice#2, #13.