Skip to content

Prism ID: an app's workspace key, sealed to the ID and carried when it joins (FR-04) - #95

Merged
humuhumu33 merged 3 commits into
mainfrom
frame-workspace
Nov 16, 2026
Merged

humuhumu33 merged 3 commits into
mainfrom
frame-workspace

Conversation

@humuhumu33

Copy link
Copy Markdown
Contributor

Why

A Prism app that keeps a visitor's work in the browser had no way to keep it private to that visitor. The frame holds the visitor's Prism ID, but it gave an app nothing to seal with. Foundry is the first app that needs this: its apps, chats and files sit in IndexedDB in the clear.

What changes

frame.workspaceKey() (FR-04). The frame hands an app 32 bytes that only a device of the visitor's Prism ID opens. The frame makes them once, seals them under the ID's private boundary key (sealPrivate), and keeps only the sealed copy in this origin's prism-id store. The app never stores the key.

  • Joining or recovering carries the key. When this browser joins an ID from another device, or recovers one from a kit, the key is resealed for that ID in the same IndexedDB write that keeps the device. Work made before joining is not lost.
  • A removed device stays locked. A removed device makes a new ID and carries nothing, so the key answers removed. { replace: true } starts a new one.
  • Rotation is handled. After a removal rotates the boundary key, a member device reseals the key under the new boundary key. The removed device cannot open it.
  • The ID card says so. While an app holds a key, the card reads "Your ID and your work, sealed on your devices".

An unpublished frame imports its panels from beside it, as panels.mjs already imports Prism ID. An app can then bundle its locked copy of the frame (Foundry will), with no fetch to this site at run time.

The ratchet shrinks. The three popovers in panels.css share one surface and title rule, and the panel's relay messages parse in one place. Net change: −6 counted lines.

Evidence

  • frame_fr_04 runs openWorkspace and carryWorkspace in Node: make, reopen, refuse another ID, carry, refuse a carry from the wrong ID, and reseal after a rotation that the removed device cannot open.
  • npm run test:identity carries the key across two apps in Chromium: stable across calls, carried through the link and six-digit code, removed after the device is removed, and replaced on request. 16 of 16 pass.
  • Planted defects are recorded in TEMPLATE-VERIFICATION.md, "An app's workspace key (FR-04)". Both were rejected and both restored green.

Not in this PR

Foundry's use of the key (sealing its store) lands in UOR-Foundation/foundry after this merges and its frame is re-pinned.

🤖 Generated with Claude Code

humuhumu33 and others added 2 commits November 16, 2026 19:37
…t joins (FR-04)

The frame hands an app 32 bytes only a device of the visitor's Prism ID opens,
sealed under the ID's private boundary key. Joining or recovering the ID
reseals it for that ID in the same write that keeps the device; a removed
device keeps its work locked. The ID card says when an app holds one.

The popovers in panels.css share one surface and title rule and relay messages
parse in one place, so the counted lines shrink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… bundle its locked copy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@humuhumu33
humuhumu33 requested a review from afflom as a code owner November 16, 2026 20:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@humuhumu33
humuhumu33 merged commit 34a8425 into main Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant