nodeSolidServer / nodeSolidServer/node-solid-server

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

Ouverte
#1,844 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
JavaScript
Étoiles
1.8k
Forks
308
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez dans lib/create-app.mjs:335-339, puis examinez les points d’entrée d’initialisation de API.authn.oidc et API.authn.tls. Vérifiez comment chaque handler appelle next() lorsque les identifiants sont absents et définissez l’achèvement comme le fait que les clients WebID-TLS et Solid-OIDC s’authentifient auprès du même serveur.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, node.js
Domaine
authentication, backend
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.