You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test_desktop_auto_login_security.py monkeypatched the pre-migration 'routes.auth_routes' module path (now backend.routes.auth_routes) — 5 stale failures fixed, now green.
Phase C correction: investigation found auth_routes.py is the desktop Windows-identity auth (NOT a web login), and LoginManager/current_user/session_manager/the API-key branch are all the live keep-path — the original plan's removals were based on a stale multi-user model. Corrected Phase C to: gut admin_routes user-mgmt/ownership (pending frontend check), remove stale CSRF-exempt entries. MFA/tenant_rls confirmed vestigial (auth_routes docstring: web-app patterns removed) -> Phase D stands.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Web login flow |`backend/routes/auth_routes.py`, Flask-Login `LoginManager` in `extensions.py`| registered | Remove web login routes + session login |
39
-
|**Admin/user-mgmt routes**|`backend/routes/admin_routes.py` (16 decorators) | registered |**Wholesale obsolete** — every route is user CRUD / role update / `transfer-ownership` / role-gated dashboard. No users/roles/owner under single-mode. Remove the user-mgmt + ownership routes; retain only genuinely-operational endpoints (cache clear, health) as owner-only, ungated. |
35
+
| Multi-session mgr |`backend/security/session_manager.py`| 1 ref: `app.py`| ⚠️ **KEEP (correction)** — it's session-cookie *security* hardening (rotation/invalidation/secure storage) for the owner's session, not a multi-user login. `MAX_CONCURRENT_SESSIONS=3` is vestigial but harmless. |
36
+
| Per-user MFA |`backend/security/mfa.py`|`extensions.py`, `models.py` (`User.verify_totp`) | De-wire, delete; drop `User.mfa_enabled`/`mfa_secret` (Phase D — confirmed vestigial: `auth_routes` docstring says MFA was removed from the flow). |
37
+
| Multi-tenant RLS |`backend/security/tenant_rls.py`| 1 ref: `app.py`| De-wire, delete (Phase D) — verify it's not providing per-row security still relied on. |
38
+
|~~Web login flow~~|`backend/routes/auth_routes.py`, `LoginManager`| registered | ⚠️ **KEEP (correction)** — `auth_routes.py` is the **desktop Windows-identity auth** (its docstring: "Web-app patterns … have been removed"), and `LoginManager`/`current_user` back the owner's session across 25 live files. NOT removable. |
|**Admin/user-mgmt routes**|`backend/routes/admin_routes.py` (16 decorators) | registered |**Vestigial** — user CRUD / role update / `transfer-ownership` / role-gated dashboard. No users/roles/owner under single-mode. Remove the user-mgmt + ownership routes; retain operational endpoints (cache clear, health) ungated. (Phase C — **verify frontend has no admin/user pages calling them first.**) |
41
+
| Stale CSRF-exempt entries |`app.py``CSRF_API_EXEMPT_PATH_PREFIXES`|`/auth/login`, `/auth/register`, `/auth/mfa/verify`, `/auth/callback/sso`| Remove — these reference routes that **no longer exist** (auth_routes only has `/check`, `/csrf-token`, `/desktop/*`). |
40
42
| Admin/permission decorators |`api_admin_required`, `require_permission`| part of the 147 decorator usages | Collapse to single-owner pass-through |
41
43
| User authz fields |`models.User.role`, `is_admin`, `mfa_*`, possibly `password_hash`| columns + indexes | Drop after de-wiring (migration) |
0 commit comments