Code review round 1 found the test copies were not copies: a reconstruction from the holders'
code drifted in a few fields and added ADR 0613 to the decision, which the real definitions do
not carry. node-uplink.json is copied byte for byte from mesh-networking
modules/mesh-connectivity-contracts/seats/node-uplink/seat.json (8d993ea), and
node-display-session.json from mesh-contracts seats/node-display-session/seat.json (3260a68a).
graphical_session_test.go's decision text now matches the real definition
("novox/hq ADR 0208, ADR 0687"). node-resolver.json and node_resolver_test.go wait for
mesh-networking's fix for outside_writes.
Builds: design 08 sign-in-page §1, §3; lead answer C-3
310 lines
8.5 KiB
JSON
310 lines
8.5 KiB
JSON
{
|
|
"format": 1,
|
|
"seat": "node-uplink",
|
|
"scope": "node",
|
|
"grain": "whole",
|
|
"domain": "Connectivity",
|
|
"decision": "novox/hq ADR 0117, ADR 0687, ADR 0689",
|
|
"description": "The node seat of the machine's uplink (ADR 0117), as ADR 0687 §1 and ADR 0689 change it: the resolver file as it is now and every network link, read by resolvers and links; and the mesh's record of a network's sign-in page, the events sign-in-asked and sign-in-ended, published by the holder on its own machine without the bus and kept in the family node-uplink.events, 7 days. Both events are optional for a holder, and nothing in the mesh consumes them.",
|
|
"verbs": [
|
|
{
|
|
"name": "resolvers",
|
|
"description": "The machine's resolver file as it is now: the resolvers, search domains and options it lists, whether it is the file the mesh declares, and when it is not, who wrote it as far as the machine shows — its header, a backup a VPN client left beside it, a link in its place, a known writer running.",
|
|
"optional": true,
|
|
"input": {
|
|
"properties": {},
|
|
"type": "object"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"required": [
|
|
"path",
|
|
"nameservers",
|
|
"written_by_the_mesh",
|
|
"changed"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "the resolver file's path"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "where the file is a link, its target"
|
|
},
|
|
"nameservers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"search": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "the file's search domains"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"header": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "the file's leading comment lines, up to four"
|
|
},
|
|
"written_by_the_mesh": {
|
|
"type": "boolean",
|
|
"description": "the file is the one the uplink holder declares, by its header"
|
|
},
|
|
"changed": {
|
|
"type": "string",
|
|
"description": "when the file last changed, RFC 3339"
|
|
},
|
|
"owner": {
|
|
"type": "string",
|
|
"description": "the account that owns the file"
|
|
},
|
|
"writer": {
|
|
"type": "string",
|
|
"description": "who wrote it when the mesh did not, as far as the machine shows"
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"description": "why writer is named so"
|
|
},
|
|
"beside": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/defs/BesideFile"
|
|
},
|
|
"description": "every file next to it whose name starts with its own: a backup a writer kept"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "links",
|
|
"description": "Every network link on the machine: its state, its addresses, whether the default route leaves through it, and the resolvers and search domains the network manager knows for it — a VPN's tunnel included.",
|
|
"optional": true,
|
|
"input": {
|
|
"properties": {},
|
|
"type": "object"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"required": [
|
|
"links"
|
|
],
|
|
"properties": {
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/defs/Link"
|
|
}
|
|
},
|
|
"dns_not_read": {
|
|
"type": "string",
|
|
"description": "the network manager could not be asked for links' names, said rather than read as no resolvers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "sign-in-asked",
|
|
"subject": "sign-in-asked.<node>",
|
|
"body": {
|
|
"$ref": "#/defs/SignInAsked"
|
|
}
|
|
},
|
|
{
|
|
"name": "sign-in-ended",
|
|
"subject": "sign-in-ended.<node>",
|
|
"body": {
|
|
"$ref": "#/defs/SignInEnded"
|
|
}
|
|
}
|
|
],
|
|
"family": {
|
|
"name": "node-uplink.events",
|
|
"max-age-days": 7
|
|
},
|
|
"paths": [
|
|
{
|
|
"path": "/etc/resolv.conf",
|
|
"steps-back-for": "node-resolver"
|
|
}
|
|
],
|
|
"defs": {
|
|
"BesideFile": {
|
|
"type": "object",
|
|
"description": "one file beside the resolver file",
|
|
"required": [
|
|
"path",
|
|
"changed"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"changed": {
|
|
"type": "string",
|
|
"description": "RFC 3339"
|
|
},
|
|
"mesh": {
|
|
"type": "boolean",
|
|
"description": "it begins as the mesh's own file does: the file a writer moved aside"
|
|
}
|
|
}
|
|
},
|
|
"Link": {
|
|
"type": "object",
|
|
"description": "one network link, as the links verb says it",
|
|
"required": [
|
|
"name",
|
|
"state"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"addresses": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"mac": {
|
|
"type": "string",
|
|
"description": "the link-layer address as ip says it; left out where the link has none"
|
|
},
|
|
"master": {
|
|
"type": "string",
|
|
"description": "the bridge or bond the link is enslaved to"
|
|
},
|
|
"parent": {
|
|
"description": "the link it rides on: its name where that link is in this machine's namespace, else its index and namespace id; left out where none"
|
|
},
|
|
"default_route": {
|
|
"type": "boolean",
|
|
"description": "the default route leaves through it"
|
|
},
|
|
"metric": {
|
|
"type": "integer",
|
|
"description": "that route's metric"
|
|
},
|
|
"dns": {
|
|
"$ref": "#/defs/LinkDNS"
|
|
}
|
|
}
|
|
},
|
|
"LinkDNS": {
|
|
"type": "object",
|
|
"description": "what the network manager knows of one link's names",
|
|
"properties": {
|
|
"servers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"domains": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"manager": {
|
|
"type": "string",
|
|
"description": "the program that said so"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "its word for the link"
|
|
}
|
|
}
|
|
},
|
|
"SignInAsked": {
|
|
"type": "object",
|
|
"required": [
|
|
"node",
|
|
"link",
|
|
"network",
|
|
"address",
|
|
"at"
|
|
],
|
|
"properties": {
|
|
"node": {
|
|
"type": "string",
|
|
"description": "the node's name"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "the interface name of the link the default route leaves through"
|
|
},
|
|
"network": {
|
|
"type": "string",
|
|
"description": "the network's name as the network manager knows it, its connection's name"
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"description": "an http or https address, the one opened"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "the time of the change it says, never of its publish, RFC 3339 in UTC to the second"
|
|
}
|
|
}
|
|
},
|
|
"SignInEnded": {
|
|
"type": "object",
|
|
"required": [
|
|
"node",
|
|
"link",
|
|
"network",
|
|
"at",
|
|
"why"
|
|
],
|
|
"properties": {
|
|
"node": {
|
|
"type": "string",
|
|
"description": "the node's name"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "empty only for a no-longer-asked said with no connection active"
|
|
},
|
|
"network": {
|
|
"type": "string",
|
|
"description": "empty only for a no-longer-asked said with no connection active"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "the time of the change it says, never of its publish, RFC 3339 in UTC to the second"
|
|
},
|
|
"why": {
|
|
"type": "string",
|
|
"enum": [
|
|
"signed-in",
|
|
"left",
|
|
"no-longer-asked"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|