Repository navigation
Add server-managed local password sign-in - #450
Open
akashanil-dev wants to merge 4 commits into
Open
akashanil-dev wants to merge 4 commits into
akashanil-dev wants to merge 4 commits into
Conversation
4 of 5 tasks
Contributor
|
Thank you for the careful work and the verification notes. Two things before this can go in: please retarget it to |
akashanil-dev
force-pushed
the
feat/self-hosted-passwords
branch
from
December 3, 2026 06:21
454c913 to
bcd0b38
Compare
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.
What and why
Self-hosted operators can now give allow-listed people a local password without depending on dusk.bot or an email service.
duskbot access add EMAIL --passwordandduskbot access password EMAILuse hidden terminal prompts. Credentials use the requested scrypt parameters (N=32768, r=8, p=1, 16-byte salt, 64-byte key), owner-only files and timing-safe comparison. Passwords accept at least 12 characters and up to 1 KB of UTF-8 input.The single new JSON route,
POST /api/auth/password, shares the existing per-address lockout, performs hash work for missing credentials, and returns the same refusal for unknown addresses and incorrect passwords. It issues existing local sessions with allow-list roles. Password resets and access removal revoke the relevant account sessions and stream tickets; independent pairings keep their existing management.The existing
/pairform gains one password field, enabled only after a password is configured. Pairing and email codes remain available. Recovery stays in the server terminal. There is no self-registration, recovery mail, OIDC or account-management page, and no new runtime dependency.Related follow-up: browser sign-out
I included a browser Sign out action because a person who signs into a shared self-hosted server also needs to end that session from the same browser. It reuses the existing logout endpoint and confirmation-dialog component, revokes only that browser session, and returns to
/pair. This is a session-lifecycle follow-up beyond the first-PR checklist, called out separately for review; it does not add another authentication or credential-management flow.Closes #438. Implements the requested scope.
Rebase and review status
Target:
dev, as requested by the maintainer. Rebased onto82cca0699240dd8524703efeb8690293370d64e5; headbcd0b38d3a34b3ffc28da8303b88b9a0705790a3. All four password-branch patches are unchanged by the rebase. The UI follow-up remains separate in #451.The maintainer's dedicated security review of the password route and session handling is still required before merging. Local tests do not replace that review.
Tested upstream base:
82cca0699240dd8524703efeb8690293370d64e5. Upstream advanced during verification; both branches also merge cleanly withdevatd012e49af2f620ac4b0b502b6d78e53fc46cabb4. That newer tip was a mergeability check, not the runtime test base.How it was checked after the rebase
dev; rerunning with Node in an isolated executable directory passed all 188 tests, with the guard still enabled. This standalone pass used Node 26.12.0; the combined browser and Electron checks used Node 24.21.0.pnpm testgate has not been run to completion after this rebase. These results are the focused checks and separate gates listed here, not a claim that the whole root suite is green.The earlier combined revision was tested on an isolated ARM64 deployment through Coolify, including a real Codex reply. The rebased revision has not been deployed; hosted instances were left unchanged during this update. Public evidence is exclusively synthetic local fixtures.
Reproduction commands and fixture setup: local-passwords verification.
pnpm testgate passesBefore / after screenshots
Before:
devat82cca0699240dd8524703efeb8690293370d64e5. After: password headbcd0b38d3a34b3ffc28da8303b88b9a0705790a3. Synthetic fixtures only; images are on separate orphanqa-assetsbranches and not in the feature diff.Sign-in and pairing — light and dark