Repository navigation
Description
Summary
Once an authenticated user can export their pod (#353), the natural next step is being able to put it back. This issue tracks the inverse: importing a previously-exported pod, optionally relocating it to a different WebID. Solid has long promised "you own your data, switch providers anytime" — this is the JSS-side delivery of that promise.
The space splits into three difficulty tiers. File as one issue with explicit phases so the easy part can ship without waiting on the hard part.
Phase 1 — Restore at the same WebID (easy)
The straight inverse of #353: same origin, same WebID, fresh server. Operator (or self-service later) uploads the tar.gz from #353 and JSS reconstructs the pod and seeds the IDP account.
POST /idp/account/import
Content-Type: application/x-tar+gzip
Authorization: <admin/operator> or boot-time CLI
→ 201 Created
CLI shape:
jss account import <archive.tar.gz> [--password <pw>]Implementation:
- Validate
manifest.json(correct shape, JSS version compatibility). - Refuse if account/pod already exists at the target WebID (avoid silent overwrite).
- Write
pod/tree to<root>/<podName>/(or root, in single-user/Single-user mode: pod should be served at server root, not /me/ #348 mode). - Seed IDP account from
account.json. Password not in the export (per Add self-service data export — download all my pod data #353); operator provides via flag/prompt or a one-shot reset link. - Reuse existing
createAccount/createPodStructurepaths so seeding stays consistent with normal pod creation.
This phase is essentially the inverse of the export and stays within established JSS abstractions.
Phase 2 — Move within the same origin (rename) (medium)
E.g. /me/ → / (which we did by hand in the #348 migration), or /alice/ → /bob/. Same server, different mount path.
What this actually entails — derived from the manual migration we performed during #348:
- Move filesystem tree to the new mount path (handling dotfiles correctly —
.acl,.meta,.quota.json). - Rewrite absolute URIs in every pod resource that references the old WebID prefix:
.aclfiles, profilecard.jsonld,publicTypeIndex,privateTypeIndex,prefs, plus any user content that hard-coded their own URI. - Update the IDP account record (
webIdfield) and the_webid_index.jsonindex. - Invalidate any active OIDC sessions/refresh tokens bound to the old WebID.
CLI shape:
jss account rename <old-webid> <new-webid>Implementation:
- Identify all RDF-bearing files (
*.acl,*.jsonld,*.ttl,*.n3). - Stream-replace the WebID prefix; keep a dry-run mode that just lists changes for inspection.
- Refuse to clobber an existing account at the new WebID.
Phase 3 — Cross-origin migration (hard, partial only)
https://oldserver.example/alice/ → https://newserver.example/alice/. The on-disk part is mechanically the same as Phase 2 with a different prefix. The hard parts can't be solved server-side:
- Federation references: ActivityPub followers, Nostr relays, every consumer of the old WebID still has the old URI. There is no protocol-level "redirect my WebID" handshake in widely deployed Solid or AP. Best the source server can do is post a tombstone document at the old WebID pointing at the new one (
<> pim:storage <https://newserver…>) and hope clients honour it. Most won't. - OIDC trust: clients that registered against the old issuer have no way to follow the move. They re-register against the new issuer.
- Cached WebIDs: indefinite, server can't reach them.
Scope this phase as: provide the tools that can work (filesystem move + URI rewrite), document the federation/OIDC limitations explicitly, and add a tombstone mode at the old origin that:
- Returns 410 Gone on every pod resource except…
GET /profile/card.jsonldwhich serves a redirect document linking to the new WebID.
Operators with cooperating clients can use this; everyone else has to update by hand. That's the honest answer.
Out of scope
- Real-time replication / pod sync between two live JSS instances (separate feature, different problem).
- Solid Pod Portability spec alignment — track if/when there's a stable spec; for now JSS does what's pragmatic.
- Re-encrypting at-rest data for cross-server moves where the destination has different storage encryption (we don't have at-rest encryption today; revisit when we do).
Acceptance
Phase 1:
- New
POST /idp/account/importandjss account importaccept a Add self-service data export — download all my pod data #353-shaped archive and reconstruct a working pod + IDP account at the same WebID. - Refuses to clobber an existing account/pod.
- Tests: roundtrip via Add self-service data export — download all my pod data #353 export → fresh JSS → import → login + read profile + check ACLs.
Phase 2:
jss account rename <old> <new>rewrites the pod and IDP record. Idempotent on retry, dry-run flag prints the diff.- Tests: cover the same migration we did by hand for Single-user mode: pod should be served at server root, not /me/ #348 (
/me/→/), plus a/alice/→/bob/case.
Phase 3:
- Cross-origin documented limits called out in
docs/configuration.md. - Tombstone-mode flag/CLI lets the old origin redirect at the WebID and 410 elsewhere.
- Tests cover the redirect document shape, not the federation-reach problem (we can't test what we can't fix).
Activity