[roads] QA B-3: an app road names whose devices it is for, and reaches only those

subject: app:<id> applied to every device in the mesh, so whoever could write
one road (app:steam goes-direct 0.0.0.0/0) changed the tunnel of other
people's devices, an exit and a classic router. An app road now needs the new
header key on: (a person, group or device), and reaches only those devices;
on: is forbidden on any other subject. The home fixture's steam road is on
Mark's devices, so it leaves Jana's, Petr's and the router's plans. Four
fixtures, a B-3 test (fails if app roads reach every device again), the
property generator scopes app roads to a person, and the R-55 renaming
rewrites on: like subject:.
This commit is contained in:
2026-11-25 09:04:50 +01:00
parent 69e3a9377d
commit b482e264d2
18 changed files with 179 additions and 84 deletions
+3 -2
View File
@@ -56,6 +56,7 @@ is not `key: value`, or a bad quoted string, is `yaml.syntax`.
|:--|:--|:--|:--|
| `id` | yes | 6 characters of `0123456789abcdefghjkmnpqrstvwxyz` (no `i l o u`), random | `id.format`; must equal the file name's prefix (`id.file-name`); unique in the store (`id.duplicate`, both files grant nothing) |
| `subject` | yes | a reference (below): `person:`, `group:`, `device:` or `app:` | `ref.format`, `subject.kind` (not allowed for the verb), `subject.unknown` (not in the snapshots) |
| `on` | yes for an `app:` subject, not allowed otherwise | a reference: `person:`, `group:` or `device:`: whose devices the app road applies to | `key.missing`, `key.forbidden`, `ref.format`, `subject.kind`, `subject.unknown`. Without it an app road would change the tunnel of every device in the mesh, other people's included (QA B-3) |
| `verb` | yes | `can-reach`, `exits-through`, `goes-direct`, `never-online-without`, `custom` | `verb.unknown` |
| `object` | yes, except `custom` (where it is not allowed) | a reference: `device:`, `subnet:`, `service:` or `exit:` | `ref.format`, `object.kind`, `object.unknown`, `object.not-exit`, `subnet.not-canonical`, `subnet.unrouted`, `service.shared` (a service that shares its address and a port with another: its rule would open both, QA F-01); a `goes-direct` subnet other than `/0` that holds a mesh address is `direct.mesh` (mesh traffic never goes direct, QA F-02) |
| `until` | no | RFC 3339 with an offset: `2026-11-29T23:59:59+01:00` or `…Z`; exclusive | `until.format`; `until <= now` makes the road *inactive* (`road.expired`) |
@@ -77,7 +78,7 @@ never widens a road (QA F-09). `ports: []` is `ports.format`.
| `person:<id>` | a person in `directory.json` | opaque: 1–64 of `[A-Za-z0-9_-]` (no people directory exists in Fundamentum yet) |
| `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 `-` |
| `app:<id>` | a Domi app, on the devices its road's `on` names (QA B-3) | 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`) 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 |
@@ -97,7 +98,7 @@ Everything after the closing `---`.
### Canonical form
The form `via` writes, and which reads back byte for byte: `---`, then the keys in the order `id, subject, verb,
The form `via` writes, and which reads back byte for byte: `---`, then the keys in the order `id, subject, on, verb,
object, until, ports, via, classic, created`, absent keys left out, scalars plain when they read back unchanged
and double-quoted otherwise, `ports` as a flow list, LF line endings, `---`, then the body. A custom road's body
is ```` ```raw\n ```` + raw + ```` ```\n ````.