backend: add user management system with SQLite database #1

Open
restitux wants to merge 1 commits from auth/1-user-management into main
Owner

Add authentication and authorization infrastructure:

  • SQLite database (db.rs) with users, sessions, and app permissions tables
  • Password hashing with argon2
  • Session-based auth with random 256-bit tokens
  • Auth middleware (session validation) and admin middleware
  • Login/logout/me endpoints
  • Admin CRUD endpoints for user and permission management
  • Auto-seed default admin user on first run
  • 23 unit tests covering all DB operations

Existing API endpoints are not yet gated behind auth.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Add authentication and authorization infrastructure: - SQLite database (db.rs) with users, sessions, and app permissions tables - Password hashing with argon2 - Session-based auth with random 256-bit tokens - Auth middleware (session validation) and admin middleware - Login/logout/me endpoints - Admin CRUD endpoints for user and permission management - Auto-seed default admin user on first run - 23 unit tests covering all DB operations Existing API endpoints are not yet gated behind auth. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
restitux added 1 commit 2026-04-16 05:17:32 +00:00
Add authentication and authorization infrastructure:
- SQLite database (db.rs) with users, sessions, and app permissions tables
- Password hashing with argon2
- Session-based auth with random 256-bit tokens
- Auth middleware (session validation) and admin middleware
- Login/logout/me endpoints
- Admin CRUD endpoints for user and permission management
- Auto-seed default admin user on first run
- 23 unit tests covering all DB operations

Existing API endpoints are not yet gated behind auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
restitux marked the pull request as ready for review 2026-04-16 15:03:51 +00:00
restitux reviewed 2026-04-16 15:04:24 +00:00
restitux left a comment
Author
Owner

Read through the code and LGTM. Need to do some manual testing.

Read through the code and LGTM. Need to do some manual testing.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin auth/1-user-management:auth/1-user-management
git checkout auth/1-user-management
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: restitux/gamestream-webtransport-proxy#1