Enhance the session management system to support
- User-based session isolation with authentication and user-specific session management.
Each crawl session should be tied to a specific user and access-controlled based on roles.
Motivation:
- Ensure session data is isolated per user.
- Support multiple users safely on the same system.
- Enable role-based access for administrative and regular users.
Acceptance Criteria:
- Users can register and log in (JWT-based authentication).
- Each
CrawlSession is linked to a userID.
- Only the session owner (or admin) can access session data.
- Role-based access control is enforced (admin, user).
Suggested Tasks:
- Add
User model and authentication system.
- Extend
CrawlSession to include userID.
- Modify
CrawlerManager to enforce user session isolation.
- Update API endpoints to validate user permissions.
- Write unit and integration tests for user session isolation.