nodeSolidServer / nodeSolidServer/node-solid-server

Re-consider access token lifespan

オープン
#1,615 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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:

  1. 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
  2. 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず src/AccessToken.js のデフォルトの14日間の有効期間から始め、その後、issue で説明されている authorization code flow、refresh-token option、Cookie の処理、OpenID Connect に関する考慮事項を確認します。実装前にセキュリティ設計を決定する必要があります。done には、トークンの有効期間に関する合意済みの戦略と、それが更新および再認証に与える影響を含める必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
authentication, security
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。