feat: implement JWT auth and role-based access control (Issue #373)#396
feat: implement JWT auth and role-based access control (Issue #373)#396Somil450 wants to merge 3 commits into
Conversation
|
@utksh1 plz review this PR |
utksh1
left a comment
There was a problem hiding this comment.
Requesting changes before this can merge. The PR seeds a default admin/admin account and falls back to a hardcoded JWT secret, which is not acceptable for an auth/RBAC feature. It also wraps the whole API router in authentication without a migration/rollout path, which can break existing local-first workflows and unauthenticated health/tooling calls. Please require an explicit configured secret, avoid default production credentials, provide a documented bootstrap/admin creation flow, keep health/public endpoints intentionally public where needed, and add backend tests for login, forbidden roles, missing/invalid tokens, and protected route behavior.
|
Re-reviewed after the latest push. Still blocked: backend checks are failing, the branch is conflicting, and the auth model still needs to avoid default admin/admin credentials and hardcoded JWT fallback. Please rebase, require an explicit configured secret, provide a safe bootstrap flow, and cover protected route behavior with tests. |
Fixes #373.
bcryptandPyJWT.adminuser credentials upon database initialization.