TASK-002 Enforce authorization and media boundaries
This commit is contained in:
+4
-1
@@ -35,7 +35,7 @@ The scopes below translate Captain's explicit product requirements into implemen
|
||||
|
||||
### TASK-002: Enforce authorization and safe filesystem boundaries
|
||||
|
||||
- Status: Accepted; not started. **Release blocker; first implementation priority.**
|
||||
- Status: Complete — Captain accepted on 2026-11-07 with “task complete”, following manual testing.
|
||||
- Objective: Make user management and media access deny-by-default, including existing endpoints.
|
||||
- Scope: Require admin for create/update/delete user; block privilege escalation and self-service root changes; ensure disabled/deleted accounts cannot keep using access/refresh credentials; centralize server-side canonical media root/assigned-root containment; reject path traversal, symlinks escaping the media tree, malformed roots and missing files; remove client-controlled download path trust or disable old route pending TASK-004; ensure no server absolute paths leak in ordinary browsing responses.
|
||||
- Non-goals: New media UI, multi-root authorization, ZIP downloads or internet deployment.
|
||||
@@ -44,6 +44,9 @@ The scopes below translate Captain's explicit product requirements into implemen
|
||||
- Dependencies: Verify live config/runtime behavior and decide API response contract. Retain one-root permission model (PRD-002).
|
||||
- Validation: API syntax/import check, automated endpoint/path-security tests with temporary fixtures and user roles, inspect returned error messages for path leaks. Review diff; no real media used in tests.
|
||||
- Recommended specialist: Webapp Debug followed by Webapp Feature and Code Review.
|
||||
- Implementation: Admin checks on user mutations, disabled-account checks and credential revocation, descriptor-anchored virtual media listings, and HTTP 410 for the old download route. Login now issues a usable access token on first sign-in and after logout, with a `user_id` matching the refresh response. Admin user detail labels identify the username and assigned folder, and the Users page reports loading, empty and error states. No database migration was added.
|
||||
- Validation on 2026-11-25: Ten API tests with temporary SQLite and media fixtures, Python syntax checks, frontend production build and diff checks passed. Frontend lint could not run because the repository lacks ESLint configuration. Python datetime and Sass deprecation warnings remain.
|
||||
- Captain acceptance: 2026-11-07. Confirmed that a disabled friend could not sign in and an enabled friend could. Ordinary-user browsing remains TASK-003. On 2026-11-25, Captain authorized committing and merging TASK-002 into its documented destination, `codex`.
|
||||
|
||||
### TASK-003: Secure folder browsing for assigned users
|
||||
|
||||
|
||||
Reference in New Issue
Block a user