1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//! **The entries this box holds** (REMOTE §2, §8.2; DESIGN §3.3).
//!
//! An **entry** is a directory carrying the channel facts that reach one
//! engine: the host's anchors, this box's leaf and key for it, and the address.
//! It is the client's half of the pair a server-side registration is the other
//! half of — **possession, where registration is permission** — exactly as a
//! channel needs both a certificate and its issuer's trust.
//!
//! ```text
//! <thrall-data-root>/wire/workspaces/<leaf>/{ca.pem, client.pem, client.key, address}
//! ```
//!
//! **The path is REMOTE §8.2's, unchanged**, so a pair the operator minted for
//! a client box is filed the same way whichever program reads it. The directory
//! name is this box's own label for the channel and crosses no wire: nothing a
//! foot may say names a workspace, so there is nothing here to reconcile with
//! what the engine calls anything.
//!
//! **There is no flat root, and its absence is a simplification rather than an
//! omission.** Upstream a client box also holds material directly under `wire/`,
//! because that same directory is where a *server* keeps the address it binds.
//! A foot never binds anything (DESIGN §2), so that second meaning does not
//! exist here and one shape covers every case: every channel is an entry, and a
//! box with one engine has one entry.
//!
//! **Entries share nothing.** Not anchors — two engines are two operators'
//! trust roots — not leaves, since one certificate is one client identity, and
//! not addresses. So there is no inheritance and no path by which one entry can
//! be read through another; the structure below is a `readdir` and a read per
//! directory, and separation is the absence of a mechanism.
//!
//! **A refusal is one entry's, never the set's.** [`Entry::channel`] carries
//! its own `Result`, so a half-provisioned entry says so while every other
//! entry stands — a box serving three engines does not lose the two that are
//! fine.
use ;
use ;
/// The material directory's leaf under the data root.
pub const WIRE: &str = "wire";
/// The entries directory's leaf under [`WIRE`].
pub const ENTRIES: &str = "workspaces";
/// One channel this box holds.
/// Where entries live under a data root.
/// Every entry in `dir`, sorted by [`leaf`](Entry::leaf).
///
/// **A directory that will not read is zero entries, not a refusal.** Absent,
/// unreadable and empty are one fact — this box holds no channel — and that is
/// the shape of a foot that has been installed and not yet provisioned.
/// One directory read as the entry it claims to be.