nodeSolidServer / nodeSolidServer/node-solid-server
feature: support both WebID-TLS and Solid-OIDC authentication simultaneously
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.8k
- フォーク
- 308
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Summary
Currently NSS only supports one authentication method at a time (--auth tls OR --auth oidc). It would be valuable to support both simultaneously.
Current Behavior
// lib/create-app.mjs:335-339
const auth = argv.forceUser ? 'forceUser' : argv.auth
if (!(auth in API.authn)) {
throw new Error(`Unsupported authentication scheme: ${auth}`)
}
await API.authn[auth].initialize(app, argv) // Only ONE method initialized
Proposed Behavior
Initialize both auth handlers and let them chain naturally:
async function initAuthentication(app, argv) {
// Initialize both handlers
await API.authn.oidc.initialize(app, argv)
await API.authn.tls.initialize(app, argv)
}
The handlers already call next() when they don't find their credentials, so they'd naturally fall through to the next method.
Benefits
- Flexibility - Different clients can use different auth methods against the same server
- Migration path - Users can transition gradually between auth methods
- Spec compliance - Solid doesn't mandate one auth method over another
- Client compatibility - Legacy TLS clients and modern OIDC clients work together
Implementation
The change is minimal:
- Remove the either/or logic in
initAuthentication() - Initialize both handlers (or make it configurable:
--auth oidc,tls) - Auth chain: OIDC → TLS → anonymous
Prior Art
JavaScriptSolidServer (JSS) already supports this - it tries auth methods in sequence:
- Solid-OIDC (DPoP tokens)
- WebID-TLS (client certificates)
- Bearer tokens
Works well and provides maximum flexibility.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
lib/create-app.mjs:335-339 から開始し、次に API.authn.oidc と API.authn.tls の初期化エントリポイントを調べます。認証情報がない場合に各ハンドラーがどのように next() を呼び出すかを確認し、WebID-TLS クライアントと Solid-OIDC クライアントの両方が同じサーバーに対して認証できることを完了条件として定義します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- authentication, backend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100