Repository navigation
Description
Tracker for converging the existing profile/key-linking issues (#42, #6, #4, #39, #86, #319) onto the W3C Linked Web Storage 1.0 Authentication Suite FPWDs published 2026-04-23 — and on the substrate they delegate to, W3C Controlled Identifiers v1.0.
This issue does not propose a new design from scratch. It captures the design that fell out of reading the LWS FPWDs against JSS's current state, so future PRs can reference one place.
Key insight
LWS auth FPWDs delegate identity-document semantics to W3C Controlled Identifiers 1.0. A WebID becomes LWS-conformant for self-signed auth (LWS10-CID, LWS10-did:key) by being a valid CID document — i.e. by carrying verificationMethod, authentication, assertionMethod, controller, publicKeyJwk/publicKeyMultibase triples. No separate DID document needed for the WebID-controlled case.
This converges several historically separate JSS workstreams onto one mechanism.
Current JSS state
src/webid/profile.js already declares cid: and lws: prefixes (prep work landed) but writes zero verification material. The path to conformance is additive — no breaking changes to existing profiles.
Proposed profile shape
A WebID with three keys: a Nostr secp256k1 (NIP-98), a did:key Ed25519 (LWS10), and a passkey/WebAuthn credential.
{
"@context": [
"https://www.w3.org/ns/cid/v1",
{
"foaf": "http://xmlns.com/foaf/0.1/",
"solid": "http://www.w3.org/ns/solid/terms#",
"schema": "http://schema.org/",
"pim": "http://www.w3.org/ns/pim/space#",
"ldp": "http://www.w3.org/ns/ldp#",
"owl": "http://www.w3.org/2002/07/owl#",
"lws": "https://www.w3.org/ns/lws#",
"nostr": "https://w3id.org/nostr/vocab#",
"alsoKnownAs": { "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs", "@type": "@id" },
"sameAs": { "@id": "owl:sameAs", "@type": "@id" }
}
],
"id": "https://alice.solid.social/profile/card.jsonld#me",
"type": ["foaf:Person"],
"controller": "https://alice.solid.social/profile/card.jsonld#me",
"verificationMethod": [
{ "id": "...#nostr-key-1", "type": "Multikey", "controller": "...#me", "publicKeyMultibase": "fe70102…" },
{ "id": "...#did-key-1", "type": "Multikey", "controller": "...#me", "publicKeyMultibase": "z6MkpT…" },
{ "id": "...#passkey-1", "type": "JsonWebKey", "controller": "...#me", "publicKeyJwk": { "kty": "EC", "crv": "P-256", "x": "…", "y": "…" } }
],
"authentication": ["...#nostr-key-1", "...#did-key-1", "...#passkey-1"],
"assertionMethod": ["...#did-key-1"],
"alsoKnownAs": ["did:nostr:124c0…", "did:key:z6Mk…"],
"sameAs": "did:nostr:124c0…"
}Notes:
https://www.w3.org/ns/cid/v1is the first@contextentry. CID-aware verifiers process this directly; existing JSS predicates (oidcIssuer,pim:storage,ldp:inbox,service, …) live in the inline prefix object so JSON-LD output is byte-stable for everything else.- Nostr secp256k1 uses did:nostr's multikey recipe (parity byte + multicodec
0xe7,0x01+ base16-lower) so a NIP-98 verifier can decode straight to the 32-byte x-only key without dereferencing a DID document. alsoKnownAsis the forward link to DID URIs (matches did:nostr's conventional binding);sameAskeeps the existingsrc/auth/did-nostr.jsresolver working unchanged.
Verification flow (key K → WebID W)
- Identify subject from credential:
sub(LWS-CID JWT), pubkey hex (NIP-98), DID URI (did:key), credential ID (WebAuthn) - Fetch the WebID profile (which is the CID document)
- Find matching
verificationMethod— bykidfor JWT, by raw key match for NIP-98 - Confirm it appears in
authentication(orassertionMethodfor credential issuance) - Verify the cryptographic proof using that key
- Confirm the verification method's
controlleris W (or W is its own controller)
This is profile-only for LWS-CID and WebAuthn; profile-or-DID-doc for did:nostr (existing two-way owl:sameAs ↔ alsoKnownAs from #42); DID-doc-only for did:key (the DID is the public key).
Migration path
Smallest delta — ~80–120 LOC:
| Change | Where |
|---|---|
Switch @context to array form so cid/v1 is the imported context |
src/webid/profile.js:generateProfileJsonLd |
Accept keys[] parameter; emit verificationMethod + authentication (+ optional assertionMethod) when supplied |
same |
| Pass keys through from signup (nostr pubkey, did:key, passkey credential) | src/handlers/container.js:createPodStructure, src/idp/interactions.js registration paths |
jss migrate add-keys admin command to upgrade existing pods (idempotent merge — only adds triples) |
new bin/jss.js subcommand |
Back-compat: profiles created without keys are byte-identical to today. Existing JSS resolvers (did-nostr, webid-tls) continue to work; the new design generalises the WebID-TLS pattern (cert:key → verificationMethod).
Open spec choices (FPWDs don't bind us; we get to decide)
| # | Question | Suggested default |
|---|---|---|
| 1 | Profile vs DID-doc primary | WebID is canonical for LWS-CID; DID docs supplementary via alsoKnownAs |
| 2 | kid fragment shape |
#<purpose>-<n>, never reuse after revocation |
| 3 | Key rotation | Append-only verificationMethod; revoked keys removed from authentication but stay with expirationDate |
| 4 | NIP-98 Schnorr inside CID's Multikey | Use did:nostr's encoding verbatim; no NostrPublicKey extension |
| 5 | Passkey/WebAuthn vocabulary | JsonWebKey (P-256 EC); credentialId stays in private account record, not profile |
| 6 | alsoKnownAs provenance |
Bidirectional check for did:nostr (existing); trust WebID-side for did:key (no DID doc) |
| 7 | controller self-reference vs delegation |
Self-control only for v1; delegation/recovery later |
| 8 | Recovery keys | lws:recoveryMethod extension until standardised |
| 9 | assertionMethod membership |
Only did:key for now (Schnorr/passkey are auth-only in practice) |
| 10 | Profile MIME content negotiation | Existing application/ld+json at profile/card.jsonld already conforms |
Phasing
This tracker captures design. Concrete shippable phases:
Phase 1 — Profile emits keys (PR-shaped):
src/webid/profile.jsacceptskeys[]; emits CID triples@contextarray form- New pods at signup get the keys they registered with
- No verifier-side changes yet — purely additive
- Tests for the JSON-LD structure
Phase 2 — Migration command:
jss migrate add-keysto upgrade existing pods- Idempotent; safe to re-run
Phase 3 — LWS10-CID verifier:
- Server-side support for LWS-CID JWTs (
sub/iss/client_idtriple equality,kidlookup) - Existing did:nostr / WebID-TLS verifiers stay; new LWS-CID joins them
- This is what Align JSS auth modules with LWS 1.0 Authentication Suite (FPWDs 2026-04-23) #319 / Support did:key Authentication (LWS10 Spec) #86 actually need
Phase 4 — Cross-protocol unification:
- Single "self-signed identity" verifier wrapping NIP-98, LWS-CID, did:key, WebID-TLS
- All four resolve K→W against the same
verificationMethod/authenticationdeclarations - Auth-method preference order (Auth middleware: prefer OIDC/DPoP over NIP-98 when both are present on a request #306) becomes a config
Refs
- W3C Controlled Identifiers v1.0
- LWS 1.0 Authentication: SSI via Controlled Identifiers (FPWD 2026-04-23)
- LWS 1.0 Authentication: SSI via did:key (FPWD 2026-04-23)
- W3C news announcement
- did:nostr DID Method Specification
Converges these issues
- Spec: did:nostr to WebID Resolution #42 (Spec: did:nostr → WebID Resolution)
- Align JSS auth modules with LWS 1.0 Authentication Suite (FPWDs 2026-04-23) #319 (Align JSS auth modules with LWS 1.0 FPWDs)
- Phase 2: Link did:nostr to WebID profiles (owl:sameAs) #6 (Phase 2: Link did:nostr to WebID profiles via owl:sameAs)
- Add did:nostr SSO and Schnorr (NIP-98) authentication #4 (did:nostr SSO + Schnorr/NIP-98 — done; this is the LWS-aligned next step)
- Add tests for did:nostr to WebID resolution #39 (Tests for did:nostr → WebID resolution)
- Support did:key Authentication (LWS10 Spec) #86 (Support did:key Authentication, LWS10 Spec)
- LWS Protocol Mode Support (Draft/Future) #87 (LWS Protocol Mode Support — separate concern: data plane, not auth)
- Extract Minimal Viable LWS Server #89 (Extract Minimal Viable LWS Server)
- Add WebID-TLS authentication support #67 (WebID-TLS — the existing precedent for "profile declares its keys")
- Auth middleware: prefer OIDC/DPoP over NIP-98 when both are present on a request #306 (Auth middleware preference order)
Activity
profile: emit CID v1 controller + prep verificationMethod context (#386…
docs: add LWS / CID v1 compatibility doc + README bullet (#394) (#395)
melvincarvalho commentedon May 9, 2026
Phase 3a now scoped: focused implementation issues filed for the LWS10-CID JWT path (the verifier this tracker's Phase 3 calls for):
JsonWebKeyVM, sign test JWTs)Strategy: same secp256k1 key, two signature schemes — Schnorr/BIP-340 stays for Nostr-native paths (NIP-98, did:nostr, future bip340-jcs-2025 VC signing), ECDSA/ES256K is the LWS10-CID HTTP auth path. Both VMs coexist in the profile (Multikey for the Schnorr side per the B.2 work, JsonWebKey for the ES256K side from B.3). No new key material; users keep their Nostr identity.
Doctor and JSS verifier developed together so each validates real output from the other before merging. After this lands, JSS is a strict LWS10-CID server and the doctor is the first LWS10-CID client.
auth: LWS10-CID JWT verifier with ES256K (#397) (#398)
melvincarvalho commentedon May 9, 2026
Phase 4 (cross-protocol unification) gets its first concrete instance: #399 — NIP-98 verifier upgrades
did:nostr:<pubkey>to a WebID via the same VM lookup the LWS10-CID verifier (#397/#398) does. Once it lands, OIDC/DPoP, LWS-CID, NIP-98 all share one K→W primitive. Doctor B.2's f-form Multikey VM is what gets matched on, so any user who's already used B.2 gets WebID-based NIP-98 auth automatically.auth: NIP-98 → WebID via verificationMethod lookup (#399) (#400)
auth: serve /.well-known/did/nostr/<pubkey>.json (#407) (#408)
melvincarvalho commentedon Oct 14, 2026
Closing as shipped. Phases A (profile shape, #388 / v0.0.174), B (keys via the doctor), and 3 (LWS-CID JWT verifier, #398 / v0.0.177) all landed, plus the NIP-98 → WebID upgrade (#400 / v0.0.178) and
--provision-keys(#437, #443). Current state is documented in docs/lws.md.Still open from this tracker's phasing: migration of existing on-disk profiles (#396) and the turtle-conneg blockers (#389, #390). Protocol-level LWS work continues in #621 — note that the auth model has since moved to subject-token exchange via an authorization server, so the verifier here becomes one subject-token verifier among several rather than the whole story.