Title: auth: LWS10-CID JWT verifier with ES256K (Schnorr-key dual-use, strict FPWD conformance) · Issue #397 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: auth: LWS10-CID JWT verifier with ES256K (Schnorr-key dual-use, strict FPWD conformance) · Issue #397 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: auth: LWS10-CID JWT verifier with ES256K (Schnorr-key dual-use, strict FPWD conformance) · Issue #397 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Phase 3a of #386 / concrete implementation of the #3 CID sub-bullet of #319. Goal A strict-conformant LWS 1.0 Authentication Suite: SSI via Controlled Identifiers (FPWD 2026-04-23) verifier on incoming HTTP requests, signed with ES256K (...
Open Graph Description: Phase 3a of #386 / concrete implementation of the #3 CID sub-bullet of #319. Goal A strict-conformant LWS 1.0 Authentication Suite: SSI via Controlled Identifiers (FPWD 2026-04-23) verifier on inco...
X Description: Phase 3a of #386 / concrete implementation of the #3 CID sub-bullet of #319. Goal A strict-conformant LWS 1.0 Authentication Suite: SSI via Controlled Identifiers (FPWD 2026-04-23) verifier on inco...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/397
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"auth: LWS10-CID JWT verifier with ES256K (Schnorr-key dual-use, strict FPWD conformance)","articleBody":"**Phase 3a of #386** / concrete implementation of the **#3 CID** sub-bullet of #319.\n\n## Goal\n\nA strict-conformant **[LWS 1.0 Authentication Suite: SSI via Controlled Identifiers (FPWD 2026-04-23)](https://www.w3.org/TR/2026/WD-lws10-authn-ssi-cid-20260423/)** verifier on incoming HTTP requests, signed with **ES256K** (RFC8812 — ECDSA over secp256k1, registered JWS algorithm).\n\nThe trick that makes this Nostr-native without inventing extensions: **same secp256k1 private key, two signature schemes**. Existing Nostr identities sign Schnorr/BIP-340 for Nostr; the *same* key trivially signs ECDSA for ES256K JWTs. No new key material; no Schnorr-as-JWS gymnastics.\n\n## What changes\n\nNew module `src/auth/lws-cid.js`:\n\n1. Detect LWS-CID auth: \\`Authorization: Bearer \u003cjwt>\\` where JWT header carries \\`alg: ES256K\\` (or any registered JWS alg) and \\`kid\\`.\n2. Per LWS10-CID §5: parse JWT, validate \\`sub === iss === client_id\\` (all the WebID URI), \\`exp\\` not past, \\`iat\\` recent, \\`aud\\` includes the pod origin.\n3. Dereference the WebID profile (the controlled identifier document, per CID 1.0). Locate \\`verificationMethod\\` whose \\`id\\` matches the JWT's \\`kid\\`.\n4. Decode \\`publicKeyJwk\\` (\\`kty: EC, crv: secp256k1, x, y\\`).\n5. Verify JWT signature per RFC7515 §5.2 using \\`@noble/secp256k1\\` (already in tree from NIP-98).\n6. Confirm the VM's \\`controller\\` matches the WebID (or matches the profile's declared \\`controller\\` for delegated cases).\n7. Return WebID as the authenticated identity, slot into existing auth-method preference order (#306).\n\n## Acceptance\n\n- [ ] FPWD example JWT verifies as a fixture test (\\`test/lws-cid.test.js\\`)\n- [ ] A WebID profile with a \\`JsonWebKey\\` VM (P-256 or secp256k1) accepts a correctly-signed ES256K JWT and rejects a tampered one\n- [ ] Auth middleware preference order: OIDC > LWS-CID > NIP-98 (configurable, per #306 spirit)\n- [ ] Wrong-\\`kid\\`, expired, missing-\\`aud\\` JWTs all rejected with appropriate WWW-Authenticate response\n- [ ] No regression in existing OIDC / NIP-98 paths\n\n## Pairs with doctor B.3\n\nThe client side — generating the matching profile shape and signing real JWTs — ships in **JavaScriptSolidServer/doctor#3** (now linked at JavaScriptSolidServer/doctor#3). Plan is to build them together so each side validates against real output from the other before merging.\n\n## Out of scope\n\n- LWS10-did:key (separate, simpler — VM lookup is degenerate, the kid IS the key)\n- Schnorr/BIP-340 as a custom JWS alg (non-FPWD, deferred)\n- bip340-jcs-2025 Data Integrity (different envelope; for VC signing, not HTTP auth)\n- WebAuthn passkey VMs\n\n## Refs\n\n- [LWS10-CID FPWD](https://www.w3.org/TR/2026/WD-lws10-authn-ssi-cid-20260423/)\n- [W3C Controlled Identifiers v1.0](https://www.w3.org/TR/cid-1.0/)\n- [RFC8812 — ES256K JWS algorithm](https://www.rfc-editor.org/rfc/rfc8812)\n- [CCG Multikey compromise discussion](https://github.com/w3c-ccg/community/issues/254#issuecomment-3148690444) — context for why we can later also add Schnorr-with-Multikey alongside, without breaking this path\n- #386 (overall convergence tracker)\n- #319 (broader LWS auth alignment tracker)\n- #306 (auth preference order)\n","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-09T08:57:17Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/397"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fa62a324-eca1-f26e-c8b9-be4ee9b26b56 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E614:2F9258:48B253:5BFBED:6B0389C2 |
| html-safe-nonce | 6663a86e1bdc42bda2770cf3151c6fcef3fc9e6fee96d72f8eb62e1148ae581d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjE0OjJGOTI1ODo0OEIyNTM6NUJGQkVEOjZCMDM4OUMyIiwidmlzaXRvcl9pZCI6Ijc0NTg5MTA1NDYxNTU1MDYxMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2b10a5ff6baee8862add978da668c3ed7f325dd82a19305f2ba427726fe0eb37 |
| hovercard-subject-tag | issue:4411923690 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/397/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd37e2dc5d26b7777c388aba7637712c162ff50bd26b711c6391fa3275394afd/JavaScriptSolidServer/JavaScriptSolidServer/issues/397 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd37e2dc5d26b7777c388aba7637712c162ff50bd26b711c6391fa3275394afd/JavaScriptSolidServer/JavaScriptSolidServer/issues/397 |
| og:image:alt | Phase 3a of #386 / concrete implementation of the #3 CID sub-bullet of #319. Goal A strict-conformant LWS 1.0 Authentication Suite: SSI via Controlled Identifiers (FPWD 2026-04-23) verifier on inco... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width