A VTN is a curated, nestable set of communities (VTCs) and other networks (VTNs). It is used for joint recognition and discovery. Every relationship in it is evidenced by a DTG credential.
- Design:
docs/vtn-design.md - Assumptions on open WG questions:
docs/assumptions.md - Normative requirements:
dtgwg-vti-spec/spec/11a-vtn.md(VTI-VTN-*)
| Crate | What |
|---|---|
vtn-service |
The vtn binary. It holds the network's VTA-provisioned identity (vtn setup), a fjall-backed store (via vti-common), and the vtn/* Trust Task API. |
nnm-cli |
The nnm binary, the Network Network Manager. It is the operator CLI for VTNs, as pnm is for a person and cnm for a community. It holds the operator's admin key and signs each request to a network with it. |
Phase 1 of the delivery plan, implemented:
- Listing. The network lists a VTC or VTN one-sidedly, by signing a listing VSC.
- Membership.
- The listed party fetches the unsigned membership offer.
- It signs a VMC acknowledgement.
- The network then signs the VMC grant, which completes the membership edge.
- Repudiation. A party can repudiate its listing; the listing stays published alongside the repudiation. A member can repudiate its grant, which counts as departing.
- Network actions. The network can suspend, reinstate and remove entries. These are reflected in W3C Bitstring Status Lists, for revocation and suspension.
- Publishing. Signed network index, DTG graph export (one edge per credential), and an audit log.
- VTA-provisioned identity. The network's
did:webvhand keys come from its VTA (VTI-VTN-001). Parties'did:webvhkeys are resolved with purpose checks. - Trust Task API. Every operation is a
vtn/*Trust Task (trusttasks.org,vtn/*/0.1), signed by its caller: there is no sign-in and no session. A Trust Task answer is never evidence of a relationship; the credentials it carries are (docs/trust-tasks.md). - Admin access. Administrators are DIDs, listed in
admins. Thennmsigns each request with the operator's admin key. - Nested networks. A VTN joins a parent network that lists it (
nnm memberships join <url>), sending the parentvtn/*tasks signed by its own identity, and can later leave or repudiate. - Roles, groups and broadcast. The network defines roles (
[[roles]], e.g.admins). Members register a group per role, andrequiredroles gate admission.nnm broadcast --role admins …reaches every registered group. Member communities receive it asvtc/networks/deliverand pass it to the group's members. Member networks receive it asvtn/relay/deliverand relay into their own members' groups, one signed hop at a time, without sharing rosters. Receipts come back up the chain. - Network rooms.
[[rooms]]opens a room for a role. A person in any group registered for that role, directly or through member networks, gets a short-lived room pass by presenting their group evidence. - Trust graph. The landing page's Trust graph tab draws the DTG graph from the credentials, and member networks expand in place.
- Trust registry.
[registry]projects membership to a trust registry as TRQP records (memberonvtn, under the network's DID as authority, A23), reconciled at start (adding existing members), after every change and on an interval. The profile and the DID document (TrustRegistryreferral) say where to ask;nnm registry status|check|recordsasks the registry itself. Records are written over the network's own DIDComm session ([messaging]), as signedregistry/record/*Trust Tasks (docs/trust-registry.md). - Landing page and directory. Served at
/: the network's profile, member counts, and a searchable directory (by name, tags, description or DID; filterable by kind and acknowledgement).[directory] visibilityispublic,membersoradmins. A public directory is read with unsigned Trust Tasks. For a restricted one, a member community or network, or an administrator, signs in from a wallet: the wallet approves the page's own key (auth/oob/*, A13), which then reads as them for up to[auth] browser_key_hours. A person presenting a membership credential from a member community reads with their own tools.
Not yet built (see the design's delivery plan):
- VTI roles and approvals
- trust-task transports (TSP/DIDComm)
- TSP/DIDComm delivery transports (A15)
nnm keys generate # your admin DID: put it in `admins`
vtn setup --setup-key-out setup-key.json --context vtn
# at the VTA: pnm contexts create --id vtn --name "Verifiable Trust Network" \
# --admin-did <setup DID> --admin-expires 1h
# pnm did-templates create --file templates/vtn-host.json --context vtn
cp vtn-setup.example.toml vtn-setup.toml # edit, then:
vtn setup --from vtn-setup.toml # VTA mints the did:webvh, keys go to [secrets]
vtn --config /srv/vtn/vtn.toml serve
nnm networks add whn https://whn.example.org
nnm status[secrets] backend in vtn-setup.toml (copied into vtn.toml) picks the store for the
network's keys. Each backend except the two file ones is a build feature of vtn-service:
backend |
Build | Notes |
|---|---|---|
keyring |
default | macOS Keychain, Linux Secret Service (D-Bus), Windows Credential Manager. A headless Linux server usually has none: pick another backend there. |
encrypted_file |
always | [secrets.encrypted_file] kek = { source = "passphrase", file = "…" } (or systemd_creds; tpm with --features tpm) |
plaintext |
always | Dev and test only. Needs allow_plaintext = true; the seed is written in clear to <data_dir>/seed.plaintext. |
aws |
aws-secrets |
AWS Secrets Manager (aws_secret_name, aws_region) |
gcp |
gcp-secrets |
GCP Secret Manager |
azure |
azure-secrets |
Azure Key Vault |
vault |
vault-secrets |
HashiCorp Vault KV v2 |
kubernetes |
k8s-secrets |
a namespaced Kubernetes Secret |
--features all-secrets builds every backend but TPM (which needs the system libtss2):
cargo install --path vtn-service --features all-secretsconfig_seed (the seed inline in the config file) is refused by vtn setup.
nnm keys generate
cp vtn.example.toml vtn.toml # put the DID in `admins`
cargo run --bin vtn -- init # local did:key identity
cargo run --bin vtn -- serve
nnm networks add dev http://127.0.0.1:8400Anyone can check who is or isn't a member, without trusting the network's word. Use the landing page's Check membership and Verify tab, or nnm verify <url> <did>, which needs no admin key and verifies every signature itself. You can also query the trust registry over TRQP, or check the credentials with any VC tool. See docs/verifying.md.
nnm keys generate | import --did --key-id --private-key-multibase | show
nnm networks add <name> <url> | list | use <name> | remove <name>
nnm status
nnm entries [<did>]
nnm list <did> --kind community|network [--label <label>] [--description …] [--url …] [--tag …]
nnm verify <url> <did> [--expect <network did>] [--registry <url>] [--json] # anyone; exit 0 member, 1 not, 2 indeterminate
nnm invite <did> [--kind community|network] [--label …] [--console <vtc url>] [--url …] # list, then print the invitation
nnm profile <did> [--label …] [--description …] [--url …] [--tag …]
nnm directory [terms…] [--kind community|network] [--members-only] [--federated]
nnm roles
nnm groups [--role admins]
nnm broadcast --role admins --subject "…" --body "…" [--class notice] [--reply-to <room>]
nnm broadcasts [<id>]
nnm outbox [--retry]
nnm rooms
nnm memberships list | join <url> [--parent <did>] [--role parent=local] | serve <parent> <parent=local> | leave <parent> | repudiate <url> [--parent <did>]
nnm suspend|reinstate|remove <did> [--reason <text>]
nnm graph [--include-exited] [--out graph.json]
nnm index # public directories only (A21)
nnm audit
nnm registry status | check <did> | records # asked of the trust registry, not the network (A23)Everything is a vtn/* 0.1 Trust Task at POST /v1/trust-tasks, signed for
authentication by its caller (vti_vtn::tasks, VtnClient::task). The contract and the
error codes are in docs/trust-tasks.md; the normative specifications
are on trusttasks.org.
| Who | Tasks |
|---|---|
| A listed party | entries/show, membership/{offer,acknowledge,repudiate}, groups/register, roles/list |
| A parent network this one joined | relay/deliver |
| A person | rooms/{list,pass} |
| A reader the directory admits | directory/{search,federated,summary}, graph/{show,member}, entries/show, roles/list, rooms/list (unsigned under visibility = "public") |
| An administrator's wallet sign-in on the landing page | listings/{create,list,show} (the Invite tab), plus the reads above |
| An administrator | listings/{create,update,suspend,reinstate,remove,list,show}, audit/list, groups/list, broadcasts/{send,list,show}, outbox/{list,retry}, memberships/{list,join,repudiate,leave,groups/add} |
Only what is fetched by URL stays a plain GET:
| Path | |
|---|---|
/ |
Landing page with the searchable directory |
/.well-known/vtn |
DID, profile, roles and directory visibility |
/v1/sign-in/qr.svg |
The landing page's wallet sign-in link as a QR code |
/v1/status/{revocation|suspension} |
Signed BitstringStatusListCredential |
/v1/index |
Signed index of published entries (visibility = "public" only, A21) |
/v1/credentials/{id} |
A credential the network issued or holds (visibility = "public" only, A21) |
/health |
Liveness: {status, version, did}, nothing checked |
/health/ready |
Readiness: 200 when the store reads, 503 when it does not |
A listed party signs its acknowledgement and repudiation with
vti_vtn::credentials::member::{acknowledge, repudiate}, and its group registration with
vti_vtn::groups::register.
CHANGELOG.md |
Unreleased changes. From the first release on, generated by release-plz with git-cliff from conventional commits (release-plz.toml, cliff.toml) |
CONTRIBUTING.md |
Spec-first rules, conventional commits, DCO |
deny.toml |
cargo-deny policy, shared with the VTI workspace |
.github/ |
CI (fmt, clippy -D warnings, test, MSRV, cargo-deny), Dependabot, PR template, DCO |
templates/vtn-host.json |
The VTA DID template a network is provisioned from |
docs/trust-registry.md |
Publishing membership to a trust registry, and checking it |
CLAUDE.md |
Working notes for AI-assisted development |
cargo testvtn-service/tests/cascade.rs runs live networks over real HTTP:
- WHN, with Health-AU as a member network.
- St Vincent's, a community in Health-AU.
- A cycle back to WHN.
A broadcast from WHN reaches St Vincent's through Health-AU with a verifiable hop chain, and the cycle is caught as a duplicate. The tests also cover forged relays, suspension, leaving, and status-checked member credentials.
vtn-service/tests/network_api.rs runs the World Health Network example over HTTP. Health-AU,
a second running VTN, acknowledges its listing, and MSF repudiates its own. Health-AU is then
suspended, reinstated, and departs, and is listed again.