mesh-sdk joins the sign-in-page milestone only to replace its seatlisttest copies with the three seats' whole definitions, and to update the two tests that assert today's verbs; the seat-name constants and the package's own code stay untouched (ADR 0613 §5: nothing seat-specific is added to mesh-sdk). Builds: design 08 sign-in-page §1, §2, §3, §4
320 lines
9.0 KiB
JSON
320 lines
9.0 KiB
JSON
{
|
|
"format": 1,
|
|
"seat": "node-resolver",
|
|
"scope": "node",
|
|
"grain": "whole",
|
|
"domain": "Connectivity",
|
|
"decision": "novox/hq ADR 0247, ADR 0687, ADR 0613",
|
|
"verbs": [
|
|
{
|
|
"name": "routes",
|
|
"description": "What this machine's own resolver sends where: the mesh's resolvers, which answer every name not routed elsewhere, and each link given servers of its own with the domains routed to them. Also the resolver file's outside writes it kept, newest first: when, who wrote it as far as the file says, whether a module took it, and when the resolver's own file was put back.",
|
|
"replaces": [
|
|
"resolvectl status",
|
|
"resolvectl dns",
|
|
"resolvectl domain"
|
|
],
|
|
"input": {
|
|
"properties": {},
|
|
"type": "object"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"required": [
|
|
"mesh",
|
|
"links",
|
|
"outside_writes",
|
|
"uplink_names",
|
|
"mesh_resolvers"
|
|
],
|
|
"properties": {
|
|
"mesh": {
|
|
"$ref": "#/defs/Scope",
|
|
"description": "the global scope: the mesh's resolvers, which answer every name nothing routes elsewhere"
|
|
},
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/defs/Scope"
|
|
},
|
|
"description": "every link given servers of its own"
|
|
},
|
|
"outside_writes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/defs/Displacement"
|
|
},
|
|
"description": "the resolver file's outside writes, newest first"
|
|
},
|
|
"uplink_names": {
|
|
"$ref": "#/defs/UplinkNamesOnLink",
|
|
"description": "the names of the applied list that resolved holds on the named link now, never the file's"
|
|
},
|
|
"mesh_resolvers": {
|
|
"$ref": "#/defs/MeshResolversSilence",
|
|
"description": "whether the mesh's resolvers are silent now, by the fallback's guard, and since when"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "route",
|
|
"description": "Send these domains, and every name under them, to these servers over this link — and only them: the link is never the machine's default route for names, and the mesh's own domain is refused. Replaces whatever the link was given before. A link that goes away takes its route with it.",
|
|
"replaces": [
|
|
"resolvectl dns",
|
|
"resolvectl domain",
|
|
"resolvectl default-route"
|
|
],
|
|
"input": {
|
|
"properties": {
|
|
"domains": {
|
|
"description": "the domains to route there, separated by spaces or commas",
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"description": "the network link the servers are reached over, by name (a VPN's tunnel interface)",
|
|
"type": "string"
|
|
},
|
|
"servers": {
|
|
"description": "the servers' addresses, separated by spaces or commas",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"link",
|
|
"domains",
|
|
"servers"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"required": [
|
|
"link",
|
|
"servers",
|
|
"domains",
|
|
"said"
|
|
],
|
|
"properties": {
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"servers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"domains": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"said": {
|
|
"type": "string",
|
|
"description": "what was done, in words the operator reads"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "unroute",
|
|
"description": "Take one link's route away: its domains go back to the mesh's resolvers. Nothing changes when the link has none.",
|
|
"replaces": [
|
|
"resolvectl revert"
|
|
],
|
|
"input": {
|
|
"properties": {
|
|
"link": {
|
|
"description": "the network link, by name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"link"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"required": [
|
|
"link",
|
|
"said"
|
|
],
|
|
"properties": {
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"said": {
|
|
"type": "string",
|
|
"description": "what was done, in words the operator reads"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "uplink-names",
|
|
"description": "Set the host names the uplink's holder checks a network's sign-in through: read from what resolved holds for the named link, not from the file. Its callers are the modules whose manifest invokes it, and the operator, through the mesh MCP server. Refused, naming the name and the reason: a name that is not a host name (a wildcard, a trailing dot, a label over 63 bytes), the root, the mesh's own domain or a name under it, or more than 8 names.",
|
|
"input": {
|
|
"type": "object",
|
|
"required": [
|
|
"names"
|
|
],
|
|
"properties": {
|
|
"names": {
|
|
"type": "array",
|
|
"minItems": 0,
|
|
"maxItems": 8,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 253,
|
|
"description": "a host name, in letters, digits, hyphens and dots, taken lower-cased"
|
|
},
|
|
"description": "the list replaces what was given before; an empty list takes every name away"
|
|
}
|
|
}
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"required": [
|
|
"names",
|
|
"link",
|
|
"set_at"
|
|
],
|
|
"properties": {
|
|
"names": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "the names now given"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "the link they are answered over now; empty when no link carries a default route"
|
|
},
|
|
"set_at": {
|
|
"type": "string",
|
|
"description": "when the list was set, RFC 3339"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"paths": [
|
|
{
|
|
"path": "/etc/resolv.conf"
|
|
}
|
|
],
|
|
"defs": {
|
|
"Scope": {
|
|
"type": "object",
|
|
"description": "one place resolved sends names: the machine's global servers, or a link",
|
|
"required": [
|
|
"servers",
|
|
"domains"
|
|
],
|
|
"properties": {
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"servers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"domains": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "the routing domains, without resolved's leading tilde: every name under one goes to these servers"
|
|
},
|
|
"default_route": {
|
|
"type": "boolean",
|
|
"description": "whether names no domain routes may also go here; only the mesh's resolvers are"
|
|
}
|
|
}
|
|
},
|
|
"Displacement": {
|
|
"type": "object",
|
|
"description": "one outside write of the resolver file, as the guard says it",
|
|
"required": [
|
|
"id",
|
|
"at"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "RFC 3339"
|
|
},
|
|
"writer": {
|
|
"type": "string",
|
|
"description": "who the file's own header names, or empty"
|
|
},
|
|
"taken_by": {
|
|
"type": "string",
|
|
"description": "the module that took it"
|
|
},
|
|
"taken_at": {
|
|
"type": "string",
|
|
"description": "when it was taken, RFC 3339"
|
|
},
|
|
"ended": {
|
|
"type": "string",
|
|
"description": "when the module's own file stood again, RFC 3339"
|
|
},
|
|
"how": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"UplinkNamesOnLink": {
|
|
"type": "object",
|
|
"description": "the applied list's names, as resolved holds them on the named link now",
|
|
"required": [
|
|
"names",
|
|
"link",
|
|
"refused"
|
|
],
|
|
"properties": {
|
|
"names": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"refused": {
|
|
"type": "string",
|
|
"description": "the reason resolved last refused them, or empty"
|
|
}
|
|
}
|
|
},
|
|
"MeshResolversSilence": {
|
|
"type": "object",
|
|
"description": "whether the mesh's resolvers are silent now, and since when",
|
|
"required": [
|
|
"silent"
|
|
],
|
|
"properties": {
|
|
"silent": {
|
|
"type": "boolean"
|
|
},
|
|
"since": {
|
|
"type": "string",
|
|
"description": "RFC 3339, when silent is true"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|