Re-consider access token lifespan
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- authentication, security
Direzione di ricerca
Inizia con src/AccessToken.js usando la durata predefinita di 14 giorni, quindi esamina l’authorization code flow, la refresh-token option, la gestione dei cookie e le considerazioni su OpenID Connect descritte nell’issue. Prima dell’implementazione è necessario definire un design di sicurezza; done dovrebbe includere una strategia concordata per la durata dei token e i suoi effetti sul rinnovo e sulla riautenticazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
At the moment NSS defines a default 14-day token lifespan: https://github.com/solid/oidc-op/blob/main/src/AccessToken.js#L7
Why re-consider?
- a long life for NSS access tokens affects the entire Solid ecosystem. If another server (e.g. ESS, CSS) wants to support NSS access tokens, it needs to accept tokens with a very long life.
- Bearer tokens (which is what we're talking about) are global in nature for Solid. They are extremely powerful and so any exfiltration can have significant negative consequences (i.e. a user loses data to a malicious actor). Reducing the lifespan of a global access token reduces risk for everyone
- for access tokens (especially global access tokens) the industry standard is <= 1 hour. For access tokens that secure "sensitive" data, the standard is closer to 10 minutes or less
Suggestions:
- Request a refresh token during the authorization code flow (this is part of OpenID Connect). Then, when the token is nearing expiry, exchange the refresh token for a new access token
- Completely refresh the app, passing the user through the full authorization code flow (part of OIDC). There will still be a cookie available on the identity provider, so the user will, in all likelihood, be passed right through the redirect flow and end up where they started. There are patterns for maintaining state between the start and end of that flow
- If the cookie expired on the Identity Provider, then the user would need to re-enter credentials
- NSS uses cookies so we could exchange the access token with a cookie.
Example: Gmail uses cookies. Cookies are easy to scope to a particular app, so there are no significant security issues.
- Lingua principale
- JavaScript
- Stelle
- 1.8k
- Fork
- 308
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nodeSolidServer/node-solid-server
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
nodeSolidServer/node-solid-server#1848 · 2 commenti · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nodeSolidServer/node-solid-server#1841 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nodeSolidServer/node-solid-server#1147 ·
-
remove bootstrap dependency Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
nodeSolidServer/node-solid-server#1867 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
nodeSolidServer/node-solid-server#1853 ·