nodeSolidServer / nodeSolidServer/node-solid-server

feature: support both WebID-TLS and Solid-OIDC authentication simultaneously

Offen
#1,844 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
1.8k
Forks
308
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

  1. Flexibility - Different clients can use different auth methods against the same server
  2. Migration path - Users can transition gradually between auth methods
  3. Spec compliance - Solid doesn't mandate one auth method over another
  4. 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:

  1. Solid-OIDC (DPoP tokens)
  2. WebID-TLS (client certificates)
  3. Bearer tokens

Works well and provides maximum flexibility.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne in lib/create-app.mjs:335-339 und untersuche anschließend die Einstiegspunkte für die Initialisierung von API.authn.oidc und API.authn.tls. Überprüfe, wie jeder Handler next() aufruft, wenn keine Anmeldedaten vorhanden sind, und definiere den Abschluss so, dass sowohl WebID-TLS- als auch Solid-OIDC-Clients sich beim selben Server authentifizieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js
Bereich
authentication, backend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.