Summary
The v2 API routers are missing authentication enforcement despite documentation stating "All endpoints require authentication."
Current State
- 18 v2 routers have no auth dependencies
- Only
api_key_router.py (for managing API keys) uses require_auth
- Documentation in
server.py line 261 claims auth is required
- Frontend uses
withCredentials: true but doesn't send API keys
Routers Requiring Auth
All files in codeframe/ui/routers/*_v2.py:
- batches_v2.py
- blockers_v2.py
- checkpoints_v2.py
- diagnose_v2.py
- discovery_v2.py
- environment_v2.py
- events_v2.py
- gates_v2.py
- git_v2.py
- pr_v2.py
- prd_v2.py
- projects_v2.py
- review_v2.py
- schedule_v2.py
- streaming_v2.py
- tasks_v2.py
- templates_v2.py
- workspace_v2.py
Implementation
- Add
require_auth dependency to all v2 router endpoints
- Update frontend to send API key or session token
- Consider read-only endpoints that might allow optional auth
- Update tests to include auth headers
References
Summary
The v2 API routers are missing authentication enforcement despite documentation stating "All endpoints require authentication."
Current State
api_key_router.py(for managing API keys) usesrequire_authserver.pyline 261 claims auth is requiredwithCredentials: truebut doesn't send API keysRouters Requiring Auth
All files in
codeframe/ui/routers/*_v2.py:Implementation
require_authdependency to all v2 router endpointsReferences
codeframe/auth/dependencies.py