-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroles.schema.json
More file actions
53 lines (50 loc) · 2.44 KB
/
Copy pathroles.schema.json
File metadata and controls
53 lines (50 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/frdminc/tendcf/schema/roles.schema.json",
"title": "Site Model — roles",
"description": "Feature roles and their assignment: role -> {main, backups[], peers[]} (map §4.1). This file is what dissolves 'control node' into data (R2) — deploy authority is a role a host holds, not a machine.\n\nDeliberately has NO domain_coverage block: comprehensiveness (D16(d)) is a property of a domain of DEVICE STATE, and roles are intent/assignment, not device state. There is nothing on a device that could show up as an extra entry against this file. Its absence is a decision, not an oversight.",
"type": "object",
"properties": {
"contract_version": { "$ref": "common.schema.json#/$defs/contract_version" },
"roles": {
"type": "object",
"propertyNames": { "$ref": "common.schema.json#/$defs/identifier" },
"additionalProperties": { "$ref": "#/$defs/role" },
"minProperties": 1
}
},
"required": ["contract_version", "roles"],
"additionalProperties": false,
"$defs": {
"role": {
"type": "object",
"properties": {
"description": { "type": "string", "minLength": 1 },
"main": {
"description": "The host currently holding the role. Flipping this to a backup and back is the R2 proof (guide §18 / map §13, Step 5).",
"$ref": "common.schema.json#/$defs/host_name"
},
"backups": {
"description": "Hosts that can take `main` over. Ordered by preference.",
"type": "array",
"items": { "$ref": "common.schema.json#/$defs/host_name" },
"uniqueItems": true
},
"peers": {
"description": "Hosts that participate in the role without being candidates for `main` (mirrors, observers).",
"type": "array",
"items": { "$ref": "common.schema.json#/$defs/host_name" },
"uniqueItems": true
},
"trust_tier_required": {
"description": "Minimum inventory trust_tier a host must hold to be assigned this role (map §4.1). A consented device must never silently acquire a deploy role.",
"enum": ["operator", "managed", "consented"]
},
"provides": { "$ref": "common.schema.json#/$defs/provides" },
"requires": { "$ref": "common.schema.json#/$defs/requires" }
},
"required": ["description", "main"],
"additionalProperties": false
}
}
}