Repository navigation
Bring lwsd to the Oct 2026 LWS drafts — Touchstone-conformant - #10
Conversation
- Link rel="https://www.w3.org/ns/lws#storage" on every GET/HEAD (401s too), pointing at the storage URI, replacing rel="storageDescription" (w3c/lws-protocol#183, #234). - The storage URI (the root container) answers the storage description as application/lws+cid when there is no Accept, */*, or lws+cid; lws+json still gets the root container. /-/description stays as an alias. - Description is a CID-1.0 document: @context [cid/v1, lws/v1], id = the storage URI, a StorageRoot service. The old StorageDescription service entry is gone. - Absolute Location on create. - scripts/touchstone.sh (npm run touchstone): run ebremer/touchstone against lwsd at /lws/ with Docker or a JDK 21 jar build; reports in .touchstone/runs/. Pinned to 5c49679 until ebremer/touchstone#3 lands. - CONFORMANCE.md: drift list July -> Oct 2026 with what's absorbed. Suite: 76/76 (55 core + 6 did:key + 3 CID + 12 grants) on jss 0.0.220.
…hstone core: conformant - lws/jsonpatch.js: RFC 6902 over RFC 6901, applied to a copy so a failing op leaves nothing behind. Content PATCH and linkset PATCH take application/json-patch+json (the 5 Oct baseline) and still take merge-patch; Accept-Patch lists both. - Linkset PATCH applies to the RFC 9264 document and reads the user-managed relations back out of the first link context, so a patch that forges up/type is ignored, not stored. Linksets carry an ETag, 412 on a stale If-Match, 405 + Allow for PUT, 409 when the patch would not leave a linkset behind. - Data resources remember the Content-Type they were created or updated with and serve it; container items report it as `format` (container-representation.md), not a guess from the extension. - Last-Modified with If-Modified-Since / If-Unmodified-Since; Allow on POST-to-non-container 405; access request/grant endpoints carry the Container type link and the storage link. - scripts/touchstone.sh picks a free port by default: jss falls back to another port when the requested one is busy, and the harness would then test whatever else lives there. Own suite: 88/88. Touchstone 5c49679, open target: 64 passed, 0 failed, 139 inapplicable (auth suites, grants, webhooks need Authentication) — conformant.
|
Second commit: JSON Patch baseline, stored Content-Type, linkset ETag/412/405, Last-Modified, Allow on 405s, container-type link on the grant/request endpoints. Own suite 88/88. Touchstone (
The 139 inapplicable are the three auth suites, access grants and webhooks, which need the |
…tion, RFC 9728 discovery lws/as.js is the OAuth 2.0 authorization server Authorization.html expects a storage to send clients to: RFC 8414 metadata at /.well-known/lws-configuration<prefix> (a root path, claimed through jss api.reservePath), JWKS at /-/jwks, and a token endpoint at /-/token that exchanges a self-issued did:key or CID credential (audienced to the issuer) for an ES256 at+jwt (RFC 9068: sub, iss, client_id, aud = storage, exp, iat, jti; kid = RFC 7638 thumbprint; 300 s by default, LWS_AS_TOKEN_LIFETIME to change). The storage validates at+jwt tokens against its own key — signature, iss, aud, exp/nbf/iat with skew — and never falls through from one. A credential presented directly as the Bearer is still accepted (LWS_ACCEPT_CREDENTIALS=0 to require exchange), so C12 is resolved rather than removed. The 401 challenge carries resource_metadata (RFC 9728, the 14 Oct draft) next to as_uri / realm; the protected resource metadata document is served at /.well-known/oauth-protected-resource<prefix><path>. scripts/mint-token.js gets a token the way a client does (challenge → metadata → credential → exchange); scripts/touchstone.sh --auth uses it to give the harness alice/bob tokens and declare Authentication. Own suite: 107/107 (new as.js battery, 19 checks). Touchstone 5c49679 with --auth: 109 passed, 18 failed, 76 inapplicable — auth/cid 11/11, authorization_server 9/9, storage_authorization 11/11; the failures are the type-search QUERY method (15, next on the drift list) and three access-grant details.
|
Third commit: the authorization server ( Touchstone
Per manifest: auth/cid 11/11, authorization_server 9/9, storage_authorization 11/11, access_grants 13/16, everything in core unchanged at 100%. The 18 failures are two things: 15 are the type search — the harness uses HTTP Remaining inapplicable: 37 need |
…cation, grant validation - lws10-index: the Type Search Service takes application/lws-query+json in an HTTP QUERY body; OPTIONS advertises Accept-Query; 400/415/406 per the draft; Cache-Control: private on both services; types also derived shallowly from content (Turtle <> a …, JSON @type). Fastify 4 has no QUERY, so the raw request is relabelled and remembered (CONFORMANCE.md C15); Fastify 5 would route it natively. - lws/oidc.js: an ID Token as subject token — sub dereferenced, the OP found as an lws#OpenIdProvider service equal to iss, key via OpenID Connect Discovery, azp required, aud must include the AS. - CID: only a method the document lists for authentication (embedded or referenced) authenticates; controller must be the subject; revoked / expired methods refused. - Access documents validated (type, storage, inbox as URIs, policies with action and assignee); requests may be posted by any authenticated agent; the format constraint is honoured; search filtering honours the writer allowlist. - scripts/touchstone.sh --auth declares ReachableFixtures and hosts the harness fixtures on a loopback port. Own suite: 131/131 (six batteries). Touchstone 5c49679 --auth: 172 passed, 7 failed, 24 inapplicable — auth/cid 22/22, auth/oidc 6/6, index 32/33; the three MUST failures are webhook subscription authorization and RFC 9421 signature resolution, next.
…ed AS key — Touchstone: conformant - Subscriptions: any authenticated agent, to topics it can read; read access re-checked at delivery time so a revoked grant silences a subscription; 5xx/network retried with backoff, 410 or five failures deactivate (active: false); grants/requests with an inbox are announced there. The storage description is public so receivers resolve keyid. - Access tokens must name exactly this storage as audience. - Search pages carry the QUERY filter in an opaque ?q= token; results negotiate ld+json/json like a listing. - LWS_AS_KEY_JWK: an operator-supplied AS signing key. The Touchstone runner generates one per run and declares HarnessIssuedTokens, hosts the fixtures (ReachableFixtures), targets a container inside the storage (the storage URI answers its public description, the harness needs a 401 to find the AS), page size 4. Own suite 131/131. Touchstone 5c49679 --auth: 196 passed, 0 failed, 0 cantTell, 7 inapplicable (3 SAML, 4 optional preconditions): conformant.
|
Fourth commit, and the scoreboard is done for everything but SAML: Touchstone
The seven inapplicable: three need This commit: webhook subscriptions for any authenticated reader with permission re-checked at delivery (a revoked grant silences a subscription), retry/deactivation, inbox announcements for grants, exactly-one-audience access tokens, QUERY filters carried in opaque page tokens, and |
Brings lwsd from the July 2026 draft (
7832003) to the current editor's drafts (core WD 5 Oct 2026, CID WD 21 Sep, the RFC 9728 change of 14 Oct), with Touchstone as the acceptance test. Tracked in JavaScriptSolidServer/JavaScriptSolidServer#621.Result: Touchstone
5c49679,scripts/touchstone.sh --auth— 196 passed, 0 failed, 0 cantTell, 7 inapplicable (3 SAML, 4 optional-behaviour preconditions): conformant. As an open target: 64 passed, 0 failed — conformant. Own suite: 131/131 across six batteries.Four commits, in order:
Link rel="lws#storage"on every GET/HEAD/401; the storage URI serves a CID-shaped description asapplication/lws+cid(root container vialws+json);StorageRootservice; absoluteLocation.scripts/touchstone.sh.lws/jsonpatch.js, RFC 6902, atomic), stored Content-Type served back and reported asformat, linkset ETag / 412 / 405,Last-Modified,Allowon 405s.lws/as.js) — RFC 8414 metadata at/.well-known/lws-configuration/lws(root path via jssapi.reservePath), RFC 8693 token exchange, ES256at+jwt, storage-side validation, RFC 9728resource_metadata;scripts/mint-token.js;--authmode for the runner.Cache-Control: private; content-derived types), OpenID Connect subject tokens (lws/oidc.js), stricter CID (authentication relationship only, controller, revocation), grant validation, webhooks end to end against the harness inbox (any reader may subscribe, permission re-checked at delivery, retry/deactivation, inbox announcements), exactly-one-audience tokens,LWS_AS_KEY_JWK.CONFORMANCE.mdhas the drift list with each item ticked, and a new host finding C15: Fastify 4 cannot routeQUERY, so the plugin relabels the raw request (JavaScriptSolidServer/JavaScriptSolidServer#628). Pinned to Touchstone5c49679until ebremer/touchstone#3 lands.