feat(example): a data room, end to end - #16
Merged
Conversation
Track 1 of the delivery plan. One example, one process, seven steps - and every claim demonstrated rather than asserted. A room is minted as its own DID and issues its owner a VAC. Alice invites Bob by VIC. Bob presents it and the VMC pair completes on his acknowledgement, so the room cannot assert a membership he never agreed to. Bob writes a record, sealed under the epoch key and AAD-bound to room|key|version|epoch. He then equips his agent with a VAC that is read only, four hours, and audience-bound to the agent - and the demo shows the agent recalling the record and being refused write, which its parent holds. Alice removes Bob, the epoch rotates, and Bob's key cannot open what comes after while what he already held he still holds. The run ends by printing everything the host stores, and by proving a relocated record does not open. Lives in dtg-credentials/examples rather than a new repo: it demonstrates this library, and its crypto is a dev-dependency so nothing in the library's own graph encrypts. The store sits behind a narrow RoomHost trait from the first commit, so track 2 replaces the implementation rather than rewriting the demo - that separation is the difference between this being a foundation and being throwaway. What it deliberately is not: one symmetric key per epoch rather than MLS, so no post-compromise security and O(n) membership change; did:key rather than a witnessed did:webvh, so no ownership transfer; the attributed tier rather than zero-knowledge presentation; and a BTreeMap rather than a service. Each gap is named in the module docs against what it does not prove, so the demo cannot quietly be mistaken for the product. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track 1 of the delivery plan. Stacked on
#15 (the VAC/VDC types) — review and
merge that first; this targets that branch, and will retarget to
mainonce it lands.One example, one process, seven steps.
cargo run --example data_room.What it demonstrates rather than asserts
write, which its parent holdsIt closes by proving a relocated record does not open — the AAD binding, demonstrated
rather than described.
Sample output is in the commit; the interesting lines are
agent write correctly refused: chain does not confer action writeandBob's key cannot open epoch 2 — removal actually removed.Why it lives here
examples/rather than a new repo: it demonstrates this library. Its crypto is adev-dependency, so nothing in the library's own graph encrypts — adding a cipher to a
credential crate for the sake of an example would be the wrong trade.
The one structural decision worth reviewing
The store sits behind a narrow
RoomHosttrait —put,get,list,epoch,set_epoch— from the first commit. That is the difference between this being afoundation and being throwaway: track 2 swaps the implementation for a VTC-backed one,
and that is only a swap if nothing above the trait reaches around it. Worth checking that
nothing does.
What it deliberately is not
Named in the module docs against what each gap does not prove, so the demo cannot quietly
be mistaken for the product:
did:key, not a witnesseddid:webvh— no ownership transferattributedtier — the acting member is disclosed to the host, not proven in zero knowledgeBTreeMap, not a service — no availability, quota, or multi-party operationWhat it does establish is that the credential model works end to end.