nodeSolidServer / nodeSolidServer/node-solid-server

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

Abierto
#1,844 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
JavaScript
Estrellas
1.8k
Forks
308
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza en lib/create-app.mjs:335-339 y luego inspecciona los puntos de entrada de inicialización de API.authn.oidc y API.authn.tls. Verifica cómo cada handler llama a next() cuando faltan las credenciales y define la finalización como el hecho de que tanto los clientes WebID-TLS como los de Solid-OIDC se autentiquen contra el mismo servidor.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, node.js
Área
authentication, backend
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.