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
//! Peer identity vetting — the client half of `docs/design/vetting-process.md`.
//!
//! Someone who wants to join a community is vetted by members the community
//! trusts to do it. The applicant shows each vetter a signed card of who they
//! say they are; the vetter checks it against the person and their documents
//! and signs a statement; the applicant presents the statements with their join
//! request, and the community's policy decides.
//!
//! This is the Linux kernel's web of trust with the keyring taken out: no
//! public graph of who vouched for whom, no signing parties, and a community
//! policy — not a path length through strangers' keys — deciding what is enough.
//!
//! - [`book`] — everything persisted, in `ProtectedConfig::vetting`.
//! - [`tickets`] — how a vetter lets someone ask them, and how everyone else is
//! ignored (design §8).
//! - [`applicant`] — one application per community and persona: requests out,
//! sessions and statements in, and the advisory checklist.
//! - [`vetter`] — the vetter desk: requests in, sessions out, the card check,
//! the statement, declines and withdrawals.
//! - [`wire`] — the Trust Task documents and DIDComm messages on the peer path.
//! - [`inbound`] — routing an inbound message to the right side.
//! - [`queries`] — questions put to a community (manifest, directory, profile,
//! resend), matched to their answers.
//! - [`registry`] — the vetter directory and a vetter's published profile.
//! - [`guide`] — a community's requirements in plain words.
//! - [`status`] — whether the community has revoked a vetter's grant.
//!
//! Every artifact's shape, signature and verification is vta-sdk's
//! (`protocols::vetting`, and `vetting` behind the feature of that name). This
//! module owns state and sequencing only; it never re-implements a check the
//! SDK makes.
/// Carry a generated vocabulary value into another specification's copy of it.
///
/// `trust-tasks-codegen` generates the vetting vocabulary **per specification**:
/// `VettingMethod` exists in `join-requests/manifest/0.2`, `vetting/request/0.1`,
/// `vetting/session/0.1`, `vetters/profile/0.1` and `vetters/list/0.1` as five
/// distinct Rust types with the same variants and the same wire tokens, and
/// `VettingDocumentation`, `ClaimType`, `CountryCode`, `PlaceName`,
/// `LanguageTag` and `CalendarDate` are duplicated the same way. They do not
/// unify, so a method chosen on the Vetting page cannot be handed straight to a
/// session payload.
///
/// This carries a value across by the token both spell — the only thing the two
/// copies agree on, and the thing that actually travels. It converts between
/// two generated types; it does not restate either of them.
///
/// This repo keeps one of each in its own state (the manifest's, which is the
/// vocabulary a community publishes) and converts at each task boundary.
pub
/// Hidden-vetter admission: the parameters a community publishes, and the criticality rule.
pub use VettingBook;