Phase 6: authentication, multi-user, and CSRF protection #69
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Reference
marvin8/yunjin!69
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/multiuser"
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?
Lands the Phase 6 collecting branch: three efforts making yunjin a proper multi-user application.
Effort 1 — auth, sessions, CSRF. Login/setup/logout, session-derived
current_user()/require_current_user()on every route, hand-rolled synchronizer-token CSRF on all state-changing requests, per-user session revocation viausers.sessions_valid_after,yunjin set-passwordCLI, constant-work login verification, safe?next=redirects.Effort 2 — data ownership. Global
feeds+feed_subscriptionslink table, per-user aggregates with watermark + backlog LLM aggregation and per-user no-op skips, unsubscribe with orphan-feed GC invariant, OPML and CLI scoping.Effort 3 — account management. CLI-only account creation (
yunjin create-user, no admin role), self-service password change (current-password gate; current session survives, others revoked), passkey support viawebauthn3.0.1 — username-less login, enrollment and credential management on a new Account card, 12-hour passkey sessions with a server-side replay cap — self-service account deletion with data cleanup (last-user guard in web, CLI unrestricted),yunjin create-user/delete-userCLI, docs (docs/config.md,docs/cli.md, newdocs/passkeys.mdanddocs/account.md). Also closes a setup-gate gap that account deletion made reachable (POST /setupnow enforces the recorded per-request gate).New environment variables:
YUNJIN_RP_ID,YUNJIN_ORIGIN(passkeys; disabled unless both set), plus the existing documented session/cookie variables. One dependency added (webauthn~=3.0.1). Docs updated throughout; HTTPS-on-a-stable-domain documented as the passkey prerequisite.Test suite: 622 passing; full nox green (ty, ruff, complexipy, pysentry, pytest 3.12/3.13/3.14, deptry, zaojun).
Closes #25
Closes #65
Closes #67
This PR is too large to review automatically (12670 lines; limit is 5000). Please consider splitting it into smaller PRs.