feat(access): shared guest passphrase — one low-privilege operator to hand out - #82
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
Adds a first-class shared "guest" passphrase per project: one credential an admin mints and hands out so casual users can drive the show without their own account. It always maps to the
operatorrole — never admin — so sharing it can never grant administration, and the receiver key is untouched. This is the "public password everyone shares, like a lower-level user" ask, built on the admin/operator split from #81.Model (no new socket/receiver/protocol surface — same shape as sessions):
New
@wavegrid/settingsAPI (guest.ts, exposed on the store facade):Login now falls back to the guest passphrase after real-user auth fails, so a shared password "just works" regardless of the username typed:
The username
guestis reserved (can't be created as a normal account);/api/meresolves the guest as an operator while guest access stays enabled.New role-gated HTTP endpoints (admin JWT only — receiver key rejected, operators get 403):
Desktop Access → Guest access tab: create/rotate (reveals the passphrase once in a copy dialog), turn on/off, remove. Values never persist in the renderer beyond the one reveal; only status crosses IPC otherwise. CLI:
wavegrid projects guest status|new|enable|disable|rm(also as theguestalias).Tests
packages/settings/__tests__/guest.test.ts: mint/rotate, operator-not-admin, hash-only persistence (cleartext never on disk), disable/re-enable, clear, reservedguestusername.packages/server/__tests__/http-app.test.ts: admin mint/rotate/disable/delete, guest login → operator, operator denied guest admin.HOME: settings 68, server 55, cli 106, desktop 8, + all others.pnpm buildandpnpm -r run lintclean.Not in scope
No PGlite, no receiver/WebSocket/protocol changes, no per-device keys, no forced socket close on disable (takes effect on next token refresh, like session revocation).
Link to Devin session: https://app.devin.ai/sessions/972698f89f494b86828010666a002b8f
Requested by: @pyramation