nodeSolidServer / nodeSolidServer/node-solid-server

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

Đang mở
#1,844 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
JavaScript
Star
1.8k
Fork
308
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ lib/create-app.mjs:335-339, sau đó kiểm tra các điểm vào khởi tạo API.authn.oidc và API.authn.tls. Xác minh cách mỗi handler gọi next() khi không có thông tin xác thực và xác định việc hoàn thành là khi cả các client WebID-TLS và Solid-OIDC đều xác thực với cùng một server.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, node.js
Lĩnh vực
authentication, backend
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.