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

Enhance JWT checking #1075

Open
Stezido opened this issue Mar 24, 2022 Discussed in #1010 · 2 comments
Open

Enhance JWT checking #1075

Stezido opened this issue Mar 24, 2022 Discussed in #1010 · 2 comments
Labels
idea: accepted Indicates an idea in Discussions has been accepted

Comments

@Stezido
Copy link
Contributor

Stezido commented Mar 24, 2022

Discussed in #1010

Originally posted by mayrmartin November 9, 2021
As of now only the validity of the JWT is only checked by validating the signature & the expiration time.
This brings up different problems in different domains, i.e.

  • Assume a user has an existing & valid token & the admin plans to ban/remove a user. The admin performs the ban/deletion & the API blocks further login-attempts from the user. But the banned user, who still holds a valid token, will still be able to interact with the system as long as the token does not expire / the user does not sign out.
  • Assume a user has an existing & valid token. While the session exists, the blockchain infrastructure gets redeployed/reset. When the logged-in user wants to execute blockchain-related procedures (i.e. approve slave node) the call will fail since the address saved in the JWT diverges from the actual address. This scenario will probably only happen in development but can be rated as cross-cutting-concern and could possibly affect other, slightly altered, scenarios that could occur in a production environment.

Both described scenarios could be solved by altering the validation of the JWT. Improvements could contain:

  • Alter the existing JWT check function to not only validate signature & expiration time
  • an additional reminder to rotate keys when redeploying parts of the system, forcing users to log-in again & therefore get a new JWT.
  • Implementation of renew-token: This would allow updating user information stored in the JWT periodically & would avoid forcing the user to re-sign-in once the token expired (probably overkill at this stage)
@Stezido Stezido added the idea: accepted Indicates an idea in Discussions has been accepted label Mar 24, 2022
@Stezido Stezido added this to the TruBudget 2.0.0 milestone Mar 24, 2022
@stale
Copy link

stale bot commented Apr 23, 2022

This issue has been automatically marked as stale because it has not had activity for 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 23, 2022
@stale
Copy link

stale bot commented Apr 30, 2022

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed Apr 30, 2022
@georgimld georgimld reopened this May 3, 2022
@stale stale bot removed the wontfix This will not be worked on label May 3, 2022
@galethil galethil added this to To Do in TruBudget Support & Development via automation Mar 14, 2024
@galethil galethil self-assigned this Apr 24, 2024
@galethil galethil moved this from To Do to In Development in TruBudget Support & Development Apr 24, 2024
@galethil galethil removed their assignment May 6, 2024
@galethil galethil moved this from In Development to To Do in TruBudget Support & Development May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea: accepted Indicates an idea in Discussions has been accepted
Development

No branches or pull requests

3 participants