98 lines
3.5 KiB
JSON
98 lines
3.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "SCUMPlatformCompanionConfig",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schemaVersion", "platform", "component", "proof", "session", "capabilities", "timing", "tls"],
|
|
"properties": {
|
|
"schemaVersion": { "const": 1 },
|
|
"platform": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["baseUrl"],
|
|
"properties": {
|
|
"baseUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://(?:[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?|\\[[0-9A-Fa-f:.]+\\])(?::[1-9][0-9]{0,4})?/?$",
|
|
"maxLength": 228
|
|
}
|
|
}
|
|
},
|
|
"component": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["installationId", "serverInstanceId", "pluginId", "profileKey", "artifactId", "version", "sourceRevision", "targetOs", "targetArch", "keyGeneration", "deploymentGeneration"],
|
|
"properties": {
|
|
"installationId": { "$ref": "#/$defs/identifier" },
|
|
"serverInstanceId": { "$ref": "#/$defs/identifier" },
|
|
"pluginId": { "const": "game.scum" },
|
|
"profileKey": { "const": "scum-client-manager" },
|
|
"artifactId": { "$ref": "#/$defs/identifier" },
|
|
"version": { "type": "string", "minLength": 1, "maxLength": 40 },
|
|
"sourceRevision": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
"targetOs": { "const": "windows" },
|
|
"targetArch": { "const": "amd64" },
|
|
"keyGeneration": { "type": "integer", "minimum": 1, "maximum": 2147483647 },
|
|
"deploymentGeneration": { "type": "integer", "minimum": 1, "maximum": 2147483647 }
|
|
}
|
|
},
|
|
"proof": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode", "materialEnv"],
|
|
"properties": {
|
|
"mode": { "const": "hmac-sha256" },
|
|
"materialEnv": { "const": "SCUM_COMPONENT_PROOF" }
|
|
}
|
|
},
|
|
"session": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["mode"],
|
|
"properties": {
|
|
"mode": { "const": "component-session" }
|
|
}
|
|
},
|
|
"capabilities": {
|
|
"type": "array",
|
|
"minItems": 6,
|
|
"maxItems": 6,
|
|
"uniqueItems": true,
|
|
"items": { "enum": ["component.register", "component.heartbeat", "component.health", "component.control", "game-client.bridge", "logs.stream"] },
|
|
"allOf": [
|
|
{ "contains": { "const": "component.register" } },
|
|
{ "contains": { "const": "component.heartbeat" } },
|
|
{ "contains": { "const": "component.health" } },
|
|
{ "contains": { "const": "component.control" } },
|
|
{ "contains": { "const": "game-client.bridge" } },
|
|
{ "contains": { "const": "logs.stream" } }
|
|
]
|
|
},
|
|
"timing": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["heartbeatIntervalSeconds", "commandPollIntervalSeconds", "requestTimeoutSeconds"],
|
|
"properties": {
|
|
"heartbeatIntervalSeconds": { "const": 30 },
|
|
"commandPollIntervalSeconds": { "type": "integer", "minimum": 1, "maximum": 60 },
|
|
"requestTimeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 60 }
|
|
}
|
|
},
|
|
"tls": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["policy"],
|
|
"properties": {
|
|
"policy": { "const": "verify-system-roots" }
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"identifier": {
|
|
"type": "string",
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,179}$"
|
|
}
|
|
}
|
|
}
|