Add isolated local password authentication - #15
Merged
Merged
Conversation
jzhao234
force-pushed
the
feat/local-password-auth
branch
2 times, most recently
from
September 8, 2026 20:34
f50eac4 to
0ab0bb9
Compare
TLDR Explorer can now select either the existing external magic-link verifier or a deployment-local username/password provider. Local mode uses Argon2id credentials, revocable opaque sessions, secure host-only cookies, and operator-assisted account recovery without changing existing deployments. Motivation Some Explorer installations need accounts isolated from the surrounding application fleet while keeping one consistent and reviewable authentication implementation. Fix - Add a versioned SQLite account/session store with Argon2id hashing, 256-bit opaque session tokens, idle and absolute expiration, rate limits, audit events, and immediate revocation. - Add local login, mandatory temporary-password replacement, CSRF-protected password change/logout, fixed post-login destinations, and a deny-by-default route gate. - Prompt for admin-supplied temporary passwords through hidden terminal input and never print or write them. - Preserve the external Ed25519 magic-link provider as the default for existing deployments and keep provider cookies isolated. - Add operator user lifecycle commands, protected systemd state storage, bootstrap/update support, and database backup/restore guidance. Tests - .venv/bin/python -m pytest -q (91 passed) - .venv/bin/ruff check app tests - .venv/bin/ruff format --check app tests - bash -n deploy/explorer-cli scripts/bootstrap.sh scripts/update.sh scripts/provision.sh - git diff --check - gitleaks git --staged --redact --no-banner .
jzhao234
force-pushed
the
feat/local-password-auth
branch
from
September 8, 2026 20:43
0ab0bb9 to
a06e7a4
Compare
# Conflicts: # requirements.txt
6 tasks
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.
TLDR
Explorer can now select either the existing external magic-link verifier or a deployment-local username/password provider. Local mode uses Argon2id credentials, revocable opaque sessions, secure host-only cookies, and operator-assisted account recovery without changing existing external-auth deployments.
Motivation
Some Explorer installations need accounts isolated from the surrounding application fleet while keeping one consistent, reviewable authentication implementation. Previously, Explorer could only consume the external magic-link cookie.
Fix
__Host-explorer_sessioncookie and fail local startup with an empty/default session secret.Tests
91 passed—.venv/bin/python -m pytest -qAll checks passed—.venv/bin/ruff check app tests16 files already formatted—.venv/bin/ruff format --check app testsbash -n deploy/explorer-cli scripts/bootstrap.sh scripts/update.sh scripts/provision.shgit diff --checkgitleaks git --staged --redact --no-banner .Checklist
ruff check app tests && ruff format --check app testspasspython -m pytest -qpasses, with no AWS account or network needed.exampleaddresses; no real mail)Screenshots
Not included. The two small authentication templates reuse Explorer's existing design system; their rendered forms, cookie headers, redirects, and failure states are covered by endpoint tests.