aktin / aktin/dwh-admin

Refactor authentification and authorization

Offen
#86 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @simhue Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
0
Forks
0
Ø Merge
7 T. 3 Std.
Gemergte PRs (30 T.)
2

Beschreibung

After the user is logged in, all the assigned roles of the user are storage in the browser's sessionStorage and only checked on the client-side. This is bad practice. Anyone who has a user account is able to manipulate the sessionStorage and add/remove roles freely. Or they can send a REST request to any endpoint. As long as they have a valid token, they can completely bypass the current auth management. Furthermore, whenever the token lifetime runs out, the user won't be logged off automatically, but has to send a request to a REST endpoint (e.g. register a patient) before being forwarded to the log in mask.

TODO:
- Remove storing of permissions/roles in sessionStorage
- add checks to every secure endpoint
- add visible timer for token lifetime
- refresh token lifetime after mouse movement
- automatically forward user to login mask after token lifetime runs out

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.