nodeSolidServer / nodeSolidServer/node-solid-server
Re-consider access token lifespan
未关闭
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.8k
- 派生
- 308
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 src/AccessToken.js 的默认 14 天有效期开始,然后审查 issue 中描述的 authorization code flow、refresh-token option、cookie 处理和 OpenID Connect 注意事项。实现前需要确定安全设计;done 应包括一项已达成共识的 token 生命周期策略,以及该策略对续期和重新认证的影响。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- authentication, security
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100