The exemplar draws a toybox host endowing a guest's ERTP definition with a narrowed WebApp and a rholo signer. Drawing it showed that reach computed over every dashed line erases attenuation: Mallory, with a leaked guest link, "reached" the WebApp maker and the key store. Grants now say what they act on (followed), what they were narrowed from (not followed), and what they use without handing out (not followed, but its revocation disables them). Generated-by: Claude Opus 5.5
6.0 KiB
name, description
| name | description |
|---|---|
| delegation-diagram | Delegation diagram, after Keyhive's certflow diagrams: where each party's authority came from, what it reaches, and what a revocation takes with it — use when asked for a certflow or delegation diagram; when a design delegates or attenuates authority through chains (facets of facets, caretakers, invitations, certificate capabilities, UCANs); when someone asks "who can reach what?", "where did Bob get that?", or "what breaks if we revoke this?"; when an interactive page should trace reach on hover or revoke on click. Not for a snapshot of who holds what (that's wiring-diagram), nor for the order of messages (sequence-diagram-actor-sim). |
Delegation diagram
A wiring diagram shows who holds what now. It doesn't say how they got it, so it can't answer the questions a review of delegation asks: where did this authority come from, what does it reach, and what goes when it's revoked? Keyhive's certflow diagrams answer them by drawing the grant itself as a thing, with two kinds of line.
Exemplar: example-ertp-endowment.html, next to this file: a toybox host endowing a guest's ERTP definition with a narrowed WebApp and a rholo signer. Start from it: the scene is data (parties, subjects, grants), and drawing, reach, revocation, the step-through, and the deep links all derive from that data.
Two kinds of line
- Parties are balls. Each grant is a box labelled with the access it gives over its subject:
read: doc,relay: inbox,deposit: purse. - Solid lines say who delegated to whom: granter → grant → grantee.
- Dashed lines say where the authority comes from: subject → grant → grant, down the chain, skipping the parties in between. A grant made from another grant has a dashed line from it; follow the dashes up and you reach the subject.
Keeping the two apart is the point: a party can pass along a grant it holds, but the dashes show it can't widen it. A grant whose dashed line doesn't lead to its subject is either a bug in the design or a bug in the drawing.
Dashed means provenance here. In a wiring diagram it means a weak reference, so don't mix the two notations in one picture.
Live references, not only certificates
Certflow is for certificate capabilities: signed delegations that hold up while the issuer is offline. In an ocap system, the same picture works for live references:
- A grant is an attenuating object: a facet, a caretaker's forwarder, a store's
readOnly(), a definition's endowment. - To delegate is to send that object in a message, and the solid line cites the call that sent it.
- The dashed line is what the object forwards to or closes over, and it cites the maker that built it.
As in wiring-diagram, every line cites the code (file:line). If you can't cite where a grant came from, it gets no line.
Reach is computed, not drawn
Keep the scene as data (parties, subjects, and grants with who made each, who holds it, and its access) and draw it from that data. Compute reach; never mark it by hand. Then the page can't claim a reach the data doesn't support. Give each grant three kinds of source, all drawn dashed, which reach treats differently:
over: what it acts on, narrowed. Reach follows it: holdingtestnetreaches the node, through its/api/v1/.from: the wider grant it was narrowed from. Reach doesn't follow it: holdingtestnetdoesn't reachwebApps. Following it would erase the attenuation the diagram exists to show.uses: what it holds and never hands out, such as a signer's read-only facet of the key store. Reach doesn't follow it, but revoking it disables the grant that uses it.
Reach is still an upper bound: it assumes each object passes on all it's over. Say so where it matters.
- Hover a party to trace its reach: highlight what it reaches and fade the rest. Hover Mallory, who holds whatever is most likely to leak, and her caption should match what lights up.
- Revoke on click: a revocation is a diamond held by the revoker, with a solid red line that ends in ✕ instead of an arrowhead, and red dashes back to where the revoker's authority comes from. Recompute reach. What depended on the revoked grant fades, unless another route still backs it. Fading, rather than deleting, keeps the change visible.
- Build in sequence: a snapshot can't show order, so step through the grants one at a time, as wiring-diagram's step-through does: Prev/Next, arrow keys, and
#sNdeep links. - Also take
#reach=boband#revoke=g3in the URL, so a link, or a headless screenshot, shows a highlighted state without a mouse.
Works in one colour
Every distinction is carried by shape and line style: ball versus box, solid versus dashed, arrowhead versus ✕, diamond. Colour may reinforce them but never carry them alone. The page should still read printed in black, and to someone who can't tell red from green.
Render and check
Render with headless Chromium, as in wiring-diagram, once plain, then once per interesting #reach= and #revoke= state. Look at each screenshot. Check that:
- each solid line cites a call, and each dashed line cites a maker;
- the dashes from every grant lead to its subject;
- each party's computed reach is what its job needs, and Mallory's caption matches hers;
- revoking each grant fades exactly what the design says it should;
<desc>tells the same story in prose: who delegated what to whom, and from what.
Sources
- 07 · Certflow Diagrams (Ink & Switch, Keyhive lab notebook, 2026-10-31): the notation, and hover, click-to-revoke, and drag-to-delegate on live diagrams.
- Keyhive notebook 01: the Granovetter diagram that certflow adapts.
- wiring-diagram: the snapshot companion, with the drawing helpers and the headless render recipe.
- caretaker: revocable access as a forwarder plus a revoker, the usual live-reference grant.