Skip to content

feat(solid): work on Linked Web Storage servers - #604

Merged
ixuz merged 9 commits into
mainfrom
css-lws
Nov 10, 2026
Merged

ixuz merged 9 commits into
mainfrom
css-lws

Conversation

@ixuz

@ixuz ixuz commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

What and why

#594 asks applications to test against servers that implement Linked Web Storage (LWS), as feedback to the Solid CG and the LWS WG. This runs Solid Memo against the Community Solid Server fork in jeswr/CommunitySolidServer#126, and makes the app work on the fork's LWS configurations.

  • Finding the storage: through Link rel=lws#storage and the storage description (application/lws+cid), which names the root container. HEAD requests that read links ask for Turtle first, so a storage's root keeps its Solid links.
  • Sign-in: solid-memo-client exchanges the OpenID Connect ID token for a Bearer token per storage (RFC 8693), and finds the authorization server through the challenge's resource_metadata (RFC 9728). Inrupt's client gives the app no ID token, so a build that signs in to an LWS storage needs SOLID_CLIENT=solid-memo-client.
  • Solid requests: the app makes its requests as the Solid Protocol has them, and doesn't translate them. So it needs a server that takes them alongside LWS, as both fork configurations do. LWS names new resources itself, while the app chooses its own addresses (w3c/lws-protocol#173).
  • Servers: css-lws (Solid and LWS side by side) and css-lws-only (the fork's config/lws.json), both advisory, built from fork commit ef6d664f. Renovate proposes a newer commit only after a person approves it on the Dependency Dashboard.
  • Tests: the pod tests and the signed-in tests run on both servers, and the Interop workflow runs Chromium's user journeys on both (JOURNEY_SERVER). A journey job fails only on a failure its server's e2e/journeys/servers/<id>/expected-failures.json doesn't list, as the pod jobs do.
  • Docs: docs/lws.md explains how the app works on an LWS server and why. docs/interop.md has a section for each server.

Test results: every pod test, signed-in test and Chromium journey passes on both servers. On css-lws-only the client signs in with a Bearer token from the exchange; on css-lws it stays on DPoP. css-lws-only takes the Solid Protocol's requests too, so these results don't show the app on a server that takes LWS requests alone.

Interop doesn't run on pull requests. To see the journey jobs here, dispatch the workflow on this branch.

Closes: #594

@ixuz ixuz added enhancement New feature or request interop labels Nov 6, 2026
Comment thread e2e/pod/strictLws.ts Fixed
Comment thread e2e/pod/strictLws.ts Fixed
Comment thread packages/solid/src/lwsBridge.ts Fixed
@ixuz

ixuz commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Solid Memo, built with solid-memo-client, works on the CSS LWS fork (ef6d664f) in both of its configurations. It uses LWS to find the storage and sign in, and the Solid Protocol for reads and writes. Each configuration passes the pod tests, the signed-in tests and all 30 user journeys in Chromium. The Interop workflow runs them, and anything that fails there gets recorded as an expected failure with its cause in docs/interop.md. The deployed Solid Memo site still uses Inrupt's client, which doesn't support LWS sign-in yet. Whether the app works on a server that takes only LWS's own requests is untested. By the design of the app it wouldn't, mainly because LWS picks new documents' addresses itself (w3c/lws-protocol#173).

@ixuz
ixuz marked this pull request as ready for review November 8, 2026 03:34
@elf-pavlik

Copy link
Copy Markdown

Thank you @ixuz

This looks very helpful and resolves #594 and provides very needed feedback.
I look forward tomorrow Solid CG call to discuss some of your experience!

@ixuz

ixuz commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Great! I'll do some final touch-ups before the merge. Thanks!

ixuz added 9 commits November 10, 2026 19:56
A server that speaks Linked Web Storage (LWS) names a resource's
storage with a Link of relation lws#storage on every answer, and the
storage's description (application/lws+cid) names its root container.
It doesn't type the storage pim:Storage, and the Community Solid
Server with LWS answers its storage's URI, its root container's too,
with that description when asked for anything, which has none of the
Solid links. So the app found no storage there, couldn't make a type
index, and couldn't make a release public: the ACL lookup never
reached the root's ACL.

The storage walk-up takes an LWS storage's roots from its description
when the WebID's document is in one, and a deck's folder is a
storage's root only when the description names it. Each HEAD that
reads a resource's links asks for Turtle first, or anything else, so
the root keeps its Solid links where the server has Turtle, and a
server that lists folders only as LWS has them still answers.

The app keeps making its requests as the Solid Protocol has them, and
docs/lws.md says why: LWS names a new resource itself, while every
address in an instance is the app's to choose.

Refs: #594
An LWS storage takes no DPoP-bound Solid-OIDC token: it takes a Bearer
token its authorization server issues for the OpenID Connect ID token,
in an OAuth 2.0 Token Exchange. The Community Solid Server with LWS
alone serves a DPoP request as no one's, so the app could read only
what is public there, and write nothing.

The client keeps the ID token in memory, and on a storage's LWS
challenge finds the authorization server through the protected
resource metadata the challenge names, checks it and the storage's
description as LWS asks a client to, exchanges the ID token for that
storage's token, and sends the request again with it. The ID token
goes only to an authorization server on the identity provider's
origin, as LWS binds it to none, and each storage's token only into
that storage. Inrupt's sign-in client gives the app no ID token, so
this is the own client's alone.

Refs: #594
The Linked Web Storage protocol is being written now, and the Solid CG
and the LWS WG asked applications to test against servers that
implement it. The Community Solid Server's LWS work isn't released: it
lives on a branch of jeswr's fork (pull request 126 there), on the same
8.0.0-alpha.3 as css-8. One image builds that branch at commit
ef6d664f, and two advisory servers run it, so their results are
reported, not a gate:

- css-lws, with the fork's solid-lws.json: the Solid Protocol and LWS
  side by side;
- css-lws-only, with its lws.json: LWS alone, which shows what the app
  does where the storage, its description and its links are LWS's.

Both run in memory, with the root as the storage and open to anyone,
as the tests need. css-lws-only still takes the Solid Protocol's
requests, so passing there doesn't show the app on a server that takes
LWS requests alone; docs/lws.md says the app needs a server that takes
them.

Refs: #594
css-lws builds a commit of a fork nobody has reviewed, on CI's runners
and on contributors' machines. Renovate follows the fork's branch, but a
person approves each newer commit on the Dependency Dashboard before it
is proposed, and merges it after reading the change. Its image keeps to
Node 22, which the fork's own Dockerfile runs.

Refs: #594
The signed-in tests left out css-lws and css-lws-only, so CI never
signed in to an LWS storage: a change in the fork's challenge, metadata
or token exchange would pass, and show only when someone ran the app by
hand.

Both now have an instance that isn't open, on the fork's own
configuration. The harness scripts the Community Solid Server's login
for an ID token, which client credentials don't give, and the requests
go through the app's own session from solid-memo-client, the only client
that makes the exchange, so e2e-pod may import it in one file. Beside the
shared tests, one checks which way the client signs in on each server,
and one that a Bearer token holds to its storage and its user's access.

Refs: #594
The pod-safety journey that keeps another app's data took the cards
document's address from the catalog's Turtle as written. CSS with
Linked Web Storage writes it relative to the catalog, so the journey
wrote to a relative path and got a 404. The address is now resolved
against the catalog, as a Turtle parser would.

Refs: #594
The journeys ran only on Community Solid Server 7, so the app's sign-in
to a Linked Web Storage storage in a browser was tried by hand alone.
JOURNEY_SERVER=css-lws or css-lws-only now starts that server's
signed-in instance, the fork's own configuration behind TLS, from the
image e2e/pod builds.

Where a journey reads or writes the pod itself, the harness now gets a
token as the app does there: it logs the account in on the
authorization-code flow and exchanges the ID token for the storage's.
The Solid-OIDC token client credentials give is refused by an LWS
storage, which failed the journeys that write as another app.

The fork makes the key it signs tokens with on first use, so on a newly
started server, token exchanges made side by side each made one, and
the server refused every token but one key's. The harness reads the
server's keys once before the journeys start, which makes the one key.

Refs: #594
…terop

The Interop workflow tested the LWS servers with the pod tests alone,
which sign in without a browser. A job per server now runs Chromium's
user journeys there, with the app built with solid-memo-client, the
client that exchanges the ID token for a storage's. It restores the
images the pod job caches, and gates nothing. The workflow now also
runs on changes to the app and to the journeys.

A failure of the app on a server with Linked Web Storage is what the
job is there to report, so it fails only on what its server doesn't
expect, as the pod jobs do: harness/compare.ts reads Playwright's JSON
report and compares it with e2e/journeys/servers/<id>/expected-failures.json,
each journey named by its file, its describe blocks and its title, and
each failure by its cause on docs/interop.md, as e2e/pod/compare.ts
does for the pod tests. The job fails on a journey failing that the
list doesn't name, on an error outside any journey (a teardown that
throws), and when none ran. Its summary says what passes though
listed, and the expected failures by cause. The traces of every failed
journey are kept, expected or not. interop.test.ts keeps the journeys'
lists in step with the page too, a server's causes in one section.

Refs: #594
css-lws and css-lws-only run the pod tests and the user journeys in the
Interop workflow, but the interop report named neither, so a cause
found there had no section to go in. Each now has one: the fork's
commit and configuration, how the tests run it, and that every test and
journey passes. css-lws-only takes the Solid Protocol's requests too,
which the section says, so its results aren't read as the app on LWS
requests alone. An entry may give a clause of LWS Protocol 1.0 as its
requirement, or say that LWS doesn't define what the app needs, and
docs/lws.md points to the report for what the tests find.

Refs: #594
@ixuz
ixuz added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 921daff Nov 10, 2026
61 checks passed
@ixuz
ixuz deleted the css-lws branch November 10, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request interop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding CSS LWS branch to test matrix

3 participants