Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP-based JWT validation and session management #1349

Closed
wants to merge 2 commits into from

Conversation

TanmayDhobale
Copy link
Contributor

This PR addresses the security issue related to stolen JWTs and unauthorized dashboard access. It implements IP-based token validation and enhances overall security measures.

Key changes:

  1. Store and validate IP addresses with JWTs
  2. Implement short-lived access tokens (15 minutes) and refresh token mechanism
  3. Log and limit IP changes to prevent abuse
  4. Add rate limiting to protect against brute force attacks
  5. Implement security headers for better protection against common web vulnerabilities

Resolves #1156

@TanmayDhobale TanmayDhobale marked this pull request as draft September 29, 2024 19:03
@TanmayDhobale
Copy link
Contributor Author

@devsargam can u check this

@devsargam
Copy link
Collaborator

I am unsure that this is a good thing to add

@devsargam
Copy link
Collaborator

few problems that I can see right now:

  • public ip address of users keep on rotating (example: when switching wifis or mobile data)
  • this will lot all users out when it is implemented

@TanmayDhobale
Copy link
Contributor Author

few problems that I can see right now:

  • public ip address of users keep on rotating (example: when switching wifis or mobile data)
  • this will lot all users out when it is implemented

yea could lead to unnecessary logouts

@TanmayDhobale
Copy link
Contributor Author

I am unsure that this is a good thing to add

Yeah, but @hkirat raised an issue about this.

@devsargam devsargam closed this Oct 4, 2024
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.

bug: Store ips of the user in the db along with token, make sure token is valid for that ip
2 participants