[docs] Day 2 as built: QA's attack plan answered case by case, the property design, gaps and open questions

This commit is contained in:
2026-11-25 07:55:38 +01:00
parent 38a2fea043
commit b9c0e764e6
2 changed files with 68 additions and 16 deletions
+10 -7
View File
@@ -73,7 +73,7 @@ belongs, or a single value where a list belongs, is `key.type`. A required key t
| `group:<id>` | a group in `directory.json` | as a person id |
| `device:<key>` | a device in `devices.json` | the Tessera device subkey: 32-byte Ed25519 public key, base64url without padding, 43 characters, canonical |
| `app:<id>` | a Domi app on every device | the Tessera id: 1–32 of `[a-z0-9-]`, not starting or ending with `-` |
| `subnet:<cidr>` | an IPv4 or IPv6 network | canonical: host bits zero (`192.168.100.0/24`, not `192.168.100.7/24`) |
| `subnet:<cidr>` | an IPv4 or IPv6 network | canonical: host bits zero (`192.168.100.0/24`, not `192.168.100.7/24`) and in the usual text form; IPv6 that embeds IPv4 (`::ffff:0:0/96`, `::/96`, `64:ff9b::/96`, `64:ff9b:1::/48`, `2002::/16`) is `ref.format`: write the IPv4 subnet |
| `service:<hostname>` | an Ianitor host, served by a device in `devices.json` | Ianitor's hostname rules: lowercase, labels of `[a-z0-9-]` not starting or ending with `-`, at most 63 per label and 253 in all, no wildcard, no trailing dot, not an IP address |
| `exit:<key>` | a device with `exit: true` | a device key |
@@ -84,7 +84,9 @@ Everything after the closing `---`.
- For `custom`, the body is exactly one **raw block**: a line ```` ```raw ````, the raw lines, and a last line
```` ``` ````. The raw bytes between the two fence lines are kept byte for byte — unknown WireGuard keys, CR
characters, trailing spaces, even ```` ``` ```` lines inside — and are never interpreted (`body.raw-missing`
when it is absent).
when it is absent). One thing is refused inside: a line whose key is a wg-quick hook or routing switch, in any case and
spacing — `PreUp`, `PostUp`, `PreDown`, `PostDown`, `SaveConfig`, `Table`, `FwMark` (`body.raw-hook`): wg-quick
runs the first four with bash as root.
- For every other verb the body is a free-text note, kept and never interpreted. A raw block there is an error
(`body.raw-outside-custom`), so nobody believes it applies.
@@ -118,6 +120,7 @@ Valid roads that grant nothing right now, reported with their reason (not errors
| `road.no-devices` | the subject has no devices |
| `road.self` | every subject device is the object's own device |
| `exit.conflict` | for one device: active `exits-through` roads to two different exits (that device gets neither; reported per road, naming the device) |
| `direct.kill-switch` | for one device with a kill switch: a `goes-direct` road to a subnet that reaches the internet; the kill switch wins and the subnet stays in the tunnel (reported per road, naming the device). Going direct to a private subnet stays allowed |
## `directory.json` — the people directory snapshot
@@ -133,7 +136,7 @@ Valid roads that grant nothing right now, reported with their reason (not errors
|:--|:--|
| `format` | `1` (`snapshot.format`) |
| `people[].id` | a person id (`directory.id`), unique (`directory.duplicate`) |
| `people[].name` | 1–100 characters, one line (`directory.name`) |
| `people[].name` | 1–100 characters, no leading or trailing space, and none of: control characters (CR, LF, U+0085 included), U+2028, U+2029, zero-width characters U+200B–U+200F and U+2060–U+2069, bidi controls U+202A–U+202E, U+FEFF (`directory.name`) — so a name can never carry a line into an exported config |
| `groups[].id` | a group id, unique among groups |
| `groups[].name` | as a person's name |
| `groups[].members` | person ids that exist, no repeats (`directory.member`) |
@@ -160,11 +163,11 @@ Unknown fields, bad JSON and a missing file are `snapshot.json`.
| `key` | — | a device key (`devices.key`), unique (`devices.duplicate`) |
| `name` | — | 1–64 characters of `[a-z0-9-]`, unique (`devices.name`) |
| `owner` | none | a person id in the directory (`devices.owner`); a device with no owner is reached only by `device:` roads |
| `address` | — | the device's mesh address, one IPv4 or IPv6 address, unique, not inside any device's routes (`devices.address`) |
| `address` | — | the device's mesh address, one IPv4 or IPv6 address, unique, not inside any device's routes, not loopback, link-local, multicast or IPv4-embedding IPv6 (`devices.address`) |
| `classic` | `false` | a classic WireGuard peer, **not post-quantum** |
| `exit` | `false` | offers itself as an exit |
| `relay` | `false` | may be named by `via` |
| `routes` | `[]` | canonical subnets this device routes for the mesh; not `/0`; no overlap with another device's (`devices.route`, `devices.overlap`) |
| `routes` | `[]` | canonical subnets this device routes for the mesh: private only, so not `/0`, nothing that reaches the internet (use an exit), nothing loopback, link-local, multicast, reserved or IPv4-embedding; no overlap with another device's (`devices.route`, `devices.overlap`). This is also why two peers of one device can never hold the same prefix |
| `services[].host` | — | an Ianitor hostname, unique across devices (`devices.service`) |
| `services[].ports` | — | a non-empty port list (`devices.ports`) |
@@ -178,14 +181,14 @@ entry.
|:--|:--|
| `format` | `1` |
| `device`, `name`, `address`, `classic` | this device |
| `expires` | the earliest `until` (UTC, `Z`) of the roads this plan was built from; compile again by then; `null` if none |
| `expires` | the earliest `until` (UTC, `Z`) of every road this plan was built from, on the subject's plan and on the serving device's alike; the engine must stop applying the plan at that instant even if nothing recompiles (QA R-26); `null` if none |
| `peers[]` | `key`, `name`, `address`, `classic` (*not post-quantum* when true), `allowed_ips` (sorted CIDRs), `via` (a path hint or `null`), `roads` |
| `firewall.default` | always `"deny"` |
| `firewall.rules[]` | `direction` (`in`: to this device's address; `forward`: to a subnet it routes, or to the internet as an exit), `src` (CIDR), `dst` (CIDR or `"internet"`), `proto` (`any`, `tcp`, `udp`, `icmp`), `ports` (`[lo, hi]` or `null`), `roads` |
| `dns[]` | `host`, `address`, `roads`: names this device may resolve to a mesh address |
| `exit` | `{through, roads}` or `null` |
| `kill_switch` | `{through, roads}` (`through` is `null` when two kill-switch roads disagree: only the mesh) or `null` |
| `direct[]` | `{subnet}` or `{app}` with `roads`: bypasses the tunnel (split tunnelling) |
| `direct[]` | `{app, subnet, roads}`: traffic to `subnet` bypasses the tunnel (split tunnelling); `app` is `null` for all traffic, or the one app whose traffic goes direct |
| `custom[]` | `{road, classic, raw}`: the raw block verbatim, **never checked by the compiler** |
`internet` is every address except `0.0.0.0/8`, `10.0.0.0/8`, `100.64.0.0/10`, `127.0.0.0/8`, `169.254.0.0/16`,