Skip to content

fix(history): require auth and scope entries per user#954

Open
saurabhhhcodes wants to merge 1 commit into
imDarshanGK:mainfrom
saurabhhhcodes:secure-history-user-scope-952
Open

fix(history): require auth and scope entries per user#954
saurabhhhcodes wants to merge 1 commit into
imDarshanGK:mainfrom
saurabhhhcodes:secure-history-user-scope-952

Conversation

@saurabhhhcodes
Copy link
Copy Markdown
Contributor

Summary\n- require JWT authentication on the legacy /history routes\n- persist user_id on flat-file history rows and migrate existing SQLite files safely\n- filter list/search/delete operations by the authenticated user\n- add regression coverage for unauthenticated access and cross-user read/search/delete isolation\n\nFixes #952\n\n## Validation\n- uv run --with-requirements backend/requirements.txt python -m py_compile backend/app/routers/history.py backend/app/services/database.py backend/tests/test_history.py\n- direct async SQLite smoke test for save/list/search/delete user isolation\n- uv run --with-requirements backend/requirements.txt python -m pytest backend/tests/test_history.py -q (blocked locally during collection by missing system libmagic imported by upload_file.py)\n- uv run --with-requirements backend/requirements.txt python -m pytest backend/tests/test_auth_endpoints.py -q (same local libmagic blocker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant