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

[Feat] [MUST] ADD login with permission & IP ban #27

Open
RaSan147 opened this issue Aug 11, 2022 · 1 comment
Open

[Feat] [MUST] ADD login with permission & IP ban #27

RaSan147 opened this issue Aug 11, 2022 · 1 comment
Labels
enhancement ✨ New feature or request

Comments

@RaSan147
Copy link
Owner

Required for extreme level security

Add log in feature.
Heres how:

  1. Create account by asking the admin (offline), the admin will create {"username": ["$salted password hash", permission_level]
  2. Also create a list ["token"+"permission_level]

ie: "dhskdh398wjr9" , the last "9" is the permission level

because same user may use multiple PC with multiple browsers.

So the server will generate a token and store it on Cache (use https://docs.python.org/3/library/http.cookies.html and https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) (use HttpOnly and same-origin?)

Check it with server and on every request, update the hash with new one with a Constant amount of expire days defined in the config

  1. On multiple failure (define in config), put the IP on blocklist
  2. Ask admin to manually remove that...
@RaSan147
Copy link
Owner Author

For IP ban, create a historical log for IPs used by a used a user and last access time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant