Re-consider access token lifespan
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- javascript
研究方向
從 src/AccessToken.js 的預設 14 天有效期開始,然後檢視 issue 中描述的 authorization code flow、refresh-token option、cookie 處理和 OpenID Connect 考量。實作前需要確定安全性設計;done 應包括一項已達成共識的 token 生命週期策略,以及該策略對續期和重新驗證的影響。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- JavaScript
- 星號
- 1.8k
- 分支
- 308
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nodeSolidServer/node-solid-server 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
nodeSolidServer/node-solid-server#1848 · 2 則留言 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 65/100
nodeSolidServer/node-solid-server#1841 · 2 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
nodeSolidServer/node-solid-server#1147 ·
-
難度 4/5 3-5 天 新手友好度 35/100
nodeSolidServer/node-solid-server#1867 ·
-
難度 5/5 一週以上 新手友好度 45/100
nodeSolidServer/node-solid-server#1853 ·
查看 nodeSolidServer/node-solid-server 的全部 Issue
相似的 Issue
-
bot:ai-assisted component:compact-js status:untriaged
難度 2/5 1-3 小時 新手友好度 84/100
midnightntwrk/midnight-sdk#403 ·
-
難度 1/5 1 小時以內 新手友好度 92/100
-
難度 1/5 1-3 小時 新手友好度 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
難度 2/5 1-3 小時 新手友好度 90/100