You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In October 2019, WebID-TLS tests were disabled with describe.skip() (commit 778095ad). The authentication code still works - just the tests are skipped and CI lacks DNS setup.
Fix size: ~10 lines changed.
The Bug
// Added Oct 29, 2019 by jaxoncreeddescribe.skip('ACL with WebID+TLS',function(){// <-- this .skip
The comment says "TLS is currently broken" but the code isn't broken - the tests just need tim.localhost to resolve to 127.0.0.1.
The Fix
1. Remove 5x .skip from test/integration/acl-tls-test.mjs:
Line 67, 134, 571, 616, 946
2. Add 4 lines to CI (.github/workflows/ci.yml):
- name: Setup hosts for TLS testsrun: | echo "127.0.0.1 tim.localhost" | sudo tee -a /etc/hosts echo "127.0.0.1 nicola.localhost" | sudo tee -a /etc/hosts
Done.
Verification
The code works today:
Server starts with --auth tls ✅
Responds to requests ✅
Test certificates match test profiles ✅
cert:modulus in profile matches cert ✅
Why It Matters
README still advertises --auth tls support
Solid spec requires OIDC, doesn't forbid TLS
Server-to-server, CLI, IoT use cases need non-browser auth
W3C LWS working group discussing enterprise mTLS needs (LWS-UCS #40)
References
Commit that introduced skip: 778095ad (Oct 29, 2019)
After deeper investigation and testing, the situation is:
The Good News
The WebID-TLS authentication code is functional and has been all along. The handlers at lib/api/authn/webid-tls.mjs and verification at lib/webid/lib/verify.mjs work correctly with real certificates.
The Actual Issue
The tests timeout due to a self-signed certificate verification loop:
Test client connects with cert containing WebID https://tim.localhost:7777/profile/card#me
Server's webid.verify() fetches that profile URL to verify the certificate
Internal fetch() in lib/webid/lib/get.mjs rejects the self-signed cert
Request hangs until timeout
The NODE_TLS_REJECT_UNAUTHORIZED=0 env var only affects the test client, not the server's internal fetch calls.
Updated PR
Changed the PR scope to just document the actual issue rather than claim to "fix" it. The new documentation in the test file explains exactly what's happening and how to properly fix it.
PR #1842 now just improves the documentation, replacing the misleading "TLS is broken" comment with accurate technical explanation.
// Test the internal getUris() logicconstcert={subjectaltname: 'URI:https://alice.example.com#me, URI:https://bob.example.com#me'}// Should extract both URIs
3. Test handler with/without certificate
// No cert → next() with empty session// Cert present → attempt verification (can mock webid.verify)
These unit tests would provide good coverage of the WebID-TLS code paths without needing to solve the self-signed cert verification loop.
changed the title [-]Bug: WebID-TLS tests disabled 5 years ago, ~10 line fix to re-enable[/-][+]Enable WebID-TLS integration tests (fix self-signed cert verification loop)[/+]on Jan 8, 2026
Activity
fix: re-enable WebID-TLS tests that were incorrectly disabled
docs: document actual reason WebID-TLS tests are skipped
melvincarvalho commentedon Jan 8, 2026
Investigation Results
After deeper investigation and testing, the situation is:
The Good News
The WebID-TLS authentication code is functional and has been all along. The handlers at
lib/api/authn/webid-tls.mjsand verification atlib/webid/lib/verify.mjswork correctly with real certificates.The Actual Issue
The tests timeout due to a self-signed certificate verification loop:
https://tim.localhost:7777/profile/card#mewebid.verify()fetches that profile URL to verify the certificatefetch()inlib/webid/lib/get.mjsrejects the self-signed certThe
NODE_TLS_REJECT_UNAUTHORIZED=0env var only affects the test client, not the server's internal fetch calls.Updated PR
Changed the PR scope to just document the actual issue rather than claim to "fix" it. The new documentation in the test file explains exactly what's happening and how to properly fix it.
PR #1842 now just improves the documentation, replacing the misleading "TLS is broken" comment with accurate technical explanation.
docs: document actual reason WebID-TLS tests are skipped
melvincarvalho commentedon Jan 8, 2026
Suggested Tests That Actually Work
While the full integration tests remain blocked by the self-signed cert issue, here are tests that work today:
Already Existing (unit tests with mocks)
test/unit/tls-authenticator-test.mjs- TestsTlsAuthenticatorwith mockedwebid.verify()test/unit/auth-handlers-test.mjs- TestssetAuthenticateHeader()for WebID-TLSSuggested Additional Unit Tests
1. Test
verifyKey()directly (no network needed)2. Test URI extraction from certificate SAN
3. Test handler with/without certificate
These unit tests would provide good coverage of the WebID-TLS code paths without needing to solve the self-signed cert verification loop.
docs: document actual reason WebID-TLS tests are skipped
docs: document actual reason WebID-TLS tests are skipped
[-]Bug: WebID-TLS tests disabled 5 years ago, ~10 line fix to re-enable[/-][+]Enable WebID-TLS integration tests (fix self-signed cert verification loop)[/+]