[roads] The road model, validator, compiler and explain; proto's versioned CBOR messages; the via command
Road files in Pensum's strict header subset (unknown keys are errors, random ids), the directory and device snapshots, deny-by-default compilation to one plan per device, explain from the compiler's own grants, CBOR envelope v1 with version-first refusals. Tests: the six mandatory ones (validation fixtures for every rule, revocation, the least-privilege property against an independent oracle, determinism with golden plans, explain, custom round-trip), QA's attack cases, the protocol and the CLI.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY",
|
||||
"name": "friend-node",
|
||||
"address": "100.96.0.6",
|
||||
"classic": false,
|
||||
"expires": null,
|
||||
"peers": [
|
||||
{
|
||||
"key": "BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc",
|
||||
"name": "petr-phone",
|
||||
"address": "100.96.0.7",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.7/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"c0z5wn"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": [
|
||||
{
|
||||
"direction": "forward",
|
||||
"src": "100.96.0.7/32",
|
||||
"dst": "internet",
|
||||
"proto": "any",
|
||||
"ports": null,
|
||||
"roads": [
|
||||
"c0z5wn"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"dns": [],
|
||||
"exit": null,
|
||||
"kill_switch": null,
|
||||
"direct": [
|
||||
{
|
||||
"app": "steam",
|
||||
"subnet": "0.0.0.0/0",
|
||||
"roads": [
|
||||
"e5yj1s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"custom": []
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"name": "home-server",
|
||||
"address": "100.96.0.2",
|
||||
"classic": false,
|
||||
"expires": "2026-11-29T22:59:59Z",
|
||||
"peers": [
|
||||
{
|
||||
"key": "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE",
|
||||
"name": "mark-pc",
|
||||
"address": "100.96.0.1",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.1/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"h2x8vd",
|
||||
"k3f9q2",
|
||||
"p4n6rb"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM",
|
||||
"name": "jana-phone",
|
||||
"address": "100.96.0.3",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.3/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"7tq0mz",
|
||||
"k3f9q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ",
|
||||
"name": "jana-laptop",
|
||||
"address": "100.96.0.4",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.4/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"7tq0mz",
|
||||
"k3f9q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "BQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU",
|
||||
"name": "router",
|
||||
"address": "100.96.0.5",
|
||||
"classic": true,
|
||||
"allowed_ips": [
|
||||
"100.96.0.5/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"r8m2tg"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": [
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.1/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "any",
|
||||
"ports": null,
|
||||
"roads": [
|
||||
"k3f9q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.3/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "any",
|
||||
"ports": null,
|
||||
"roads": [
|
||||
"k3f9q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.3/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "tcp",
|
||||
"ports": [
|
||||
443,
|
||||
443
|
||||
],
|
||||
"roads": [
|
||||
"7tq0mz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.4/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "any",
|
||||
"ports": null,
|
||||
"roads": [
|
||||
"k3f9q2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.4/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "tcp",
|
||||
"ports": [
|
||||
443,
|
||||
443
|
||||
],
|
||||
"roads": [
|
||||
"7tq0mz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.5/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "tcp",
|
||||
"ports": [
|
||||
22,
|
||||
22
|
||||
],
|
||||
"roads": [
|
||||
"r8m2tg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "in",
|
||||
"src": "100.96.0.5/32",
|
||||
"dst": "100.96.0.2/32",
|
||||
"proto": "udp",
|
||||
"ports": [
|
||||
53,
|
||||
53
|
||||
],
|
||||
"roads": [
|
||||
"r8m2tg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "forward",
|
||||
"src": "100.96.0.1/32",
|
||||
"dst": "192.168.100.0/24",
|
||||
"proto": "any",
|
||||
"ports": null,
|
||||
"roads": [
|
||||
"h2x8vd"
|
||||
]
|
||||
},
|
||||
{
|
||||
"direction": "forward",
|
||||
"src": "100.96.0.1/32",
|
||||
"dst": "internet",
|
||||
"proto": "any",
|
||||
"ports": null,
|
||||
"roads": [
|
||||
"p4n6rb"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"dns": [],
|
||||
"exit": null,
|
||||
"kill_switch": null,
|
||||
"direct": [
|
||||
{
|
||||
"app": "steam",
|
||||
"subnet": "0.0.0.0/0",
|
||||
"roads": [
|
||||
"e5yj1s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"custom": []
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ",
|
||||
"name": "jana-laptop",
|
||||
"address": "100.96.0.4",
|
||||
"classic": false,
|
||||
"expires": "2026-11-29T22:59:59Z",
|
||||
"peers": [
|
||||
{
|
||||
"key": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"name": "home-server",
|
||||
"address": "100.96.0.2",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.2/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"7tq0mz",
|
||||
"k3f9q2"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": []
|
||||
},
|
||||
"dns": [
|
||||
{
|
||||
"host": "photos.home.arpa",
|
||||
"address": "100.96.0.2",
|
||||
"roads": [
|
||||
"7tq0mz"
|
||||
]
|
||||
}
|
||||
],
|
||||
"exit": null,
|
||||
"kill_switch": null,
|
||||
"direct": [
|
||||
{
|
||||
"app": "steam",
|
||||
"subnet": "0.0.0.0/0",
|
||||
"roads": [
|
||||
"e5yj1s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"custom": []
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM",
|
||||
"name": "jana-phone",
|
||||
"address": "100.96.0.3",
|
||||
"classic": false,
|
||||
"expires": "2026-11-29T22:59:59Z",
|
||||
"peers": [
|
||||
{
|
||||
"key": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"name": "home-server",
|
||||
"address": "100.96.0.2",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.2/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"7tq0mz",
|
||||
"k3f9q2"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": []
|
||||
},
|
||||
"dns": [
|
||||
{
|
||||
"host": "photos.home.arpa",
|
||||
"address": "100.96.0.2",
|
||||
"roads": [
|
||||
"7tq0mz"
|
||||
]
|
||||
}
|
||||
],
|
||||
"exit": null,
|
||||
"kill_switch": null,
|
||||
"direct": [
|
||||
{
|
||||
"app": "steam",
|
||||
"subnet": "0.0.0.0/0",
|
||||
"roads": [
|
||||
"e5yj1s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"custom": []
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE",
|
||||
"name": "mark-pc",
|
||||
"address": "100.96.0.1",
|
||||
"classic": false,
|
||||
"expires": null,
|
||||
"peers": [
|
||||
{
|
||||
"key": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"name": "home-server",
|
||||
"address": "100.96.0.2",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"0.0.0.0/0",
|
||||
"100.96.0.2/32",
|
||||
"192.168.100.0/24",
|
||||
"::/0"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"h2x8vd",
|
||||
"k3f9q2",
|
||||
"p4n6rb"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": []
|
||||
},
|
||||
"dns": [],
|
||||
"exit": {
|
||||
"through": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"roads": [
|
||||
"p4n6rb"
|
||||
]
|
||||
},
|
||||
"kill_switch": {
|
||||
"through": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"roads": [
|
||||
"w9c3ke"
|
||||
]
|
||||
},
|
||||
"direct": [],
|
||||
"custom": []
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc",
|
||||
"name": "petr-phone",
|
||||
"address": "100.96.0.7",
|
||||
"classic": false,
|
||||
"expires": null,
|
||||
"peers": [
|
||||
{
|
||||
"key": "BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY",
|
||||
"name": "friend-node",
|
||||
"address": "100.96.0.6",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"0.0.0.0/0",
|
||||
"::/0"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"c0z5wn"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": []
|
||||
},
|
||||
"dns": [],
|
||||
"exit": {
|
||||
"through": "BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY",
|
||||
"roads": [
|
||||
"c0z5wn"
|
||||
]
|
||||
},
|
||||
"kill_switch": null,
|
||||
"direct": [
|
||||
{
|
||||
"app": "steam",
|
||||
"subnet": "0.0.0.0/0",
|
||||
"roads": [
|
||||
"e5yj1s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"custom": []
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"format": 1,
|
||||
"device": "BQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU",
|
||||
"name": "router",
|
||||
"address": "100.96.0.5",
|
||||
"classic": true,
|
||||
"expires": null,
|
||||
"peers": [
|
||||
{
|
||||
"key": "AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI",
|
||||
"name": "home-server",
|
||||
"address": "100.96.0.2",
|
||||
"classic": false,
|
||||
"allowed_ips": [
|
||||
"100.96.0.2/32"
|
||||
],
|
||||
"via": null,
|
||||
"roads": [
|
||||
"r8m2tg"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": {
|
||||
"default": "deny",
|
||||
"rules": []
|
||||
},
|
||||
"dns": [],
|
||||
"exit": null,
|
||||
"kill_switch": null,
|
||||
"direct": [
|
||||
{
|
||||
"app": "steam",
|
||||
"subnet": "0.0.0.0/0",
|
||||
"roads": [
|
||||
"e5yj1s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"custom": [
|
||||
{
|
||||
"road": "x1d7qa",
|
||||
"classic": true,
|
||||
"raw": "[Interface]\nMTU = 1380 \nJc = 4\nH1 = 1234567\n\n[Peer]\nPersistentKeepalive = 25\n# kept exactly as the router had it\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user