123 lines
3.4 KiB
JSON
123 lines
3.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://git.add-ideas.de/GovOPlaN/govoplan/src/branch/main/docs/installer-receipt.schema.json",
|
|
"title": "GovOPlaN signed installer receipt",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_version",
|
|
"evidence_kind",
|
|
"receipt_id",
|
|
"assessment_id",
|
|
"assessment_release",
|
|
"installed_evidence_sha256",
|
|
"catalog",
|
|
"issued_at",
|
|
"artifacts",
|
|
"signatures"
|
|
],
|
|
"properties": {
|
|
"$schema": { "type": "string", "format": "uri-reference" },
|
|
"schema_version": { "const": "0.1.0" },
|
|
"evidence_kind": { "const": "govoplan.installer-receipt" },
|
|
"receipt_id": { "$ref": "#/$defs/opaque_id" },
|
|
"assessment_id": { "$ref": "#/$defs/opaque_id" },
|
|
"assessment_release": { "$ref": "#/$defs/opaque_id" },
|
|
"installed_evidence_sha256": { "$ref": "#/$defs/sha256" },
|
|
"catalog": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["channel", "sequence", "sha256"],
|
|
"properties": {
|
|
"channel": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
},
|
|
"sequence": { "type": "integer", "minimum": 1 },
|
|
"sha256": { "$ref": "#/$defs/sha256" }
|
|
}
|
|
},
|
|
"issued_at": { "type": "string", "format": "date-time" },
|
|
"artifacts": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 256,
|
|
"items": { "$ref": "#/$defs/artifact" }
|
|
},
|
|
"signatures": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 16,
|
|
"items": { "$ref": "#/$defs/signature" }
|
|
}
|
|
},
|
|
"$defs": {
|
|
"opaque_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 160,
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
},
|
|
"package_name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128,
|
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128,
|
|
"pattern": "^[A-Za-z0-9][A-Za-z0-9._+!-]*$"
|
|
},
|
|
"artifact": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"package_name",
|
|
"package_version",
|
|
"catalog_archive_sha256",
|
|
"installed_payload"
|
|
],
|
|
"properties": {
|
|
"package_name": { "$ref": "#/$defs/package_name" },
|
|
"package_version": { "$ref": "#/$defs/version" },
|
|
"catalog_archive_sha256": { "$ref": "#/$defs/sha256" },
|
|
"installed_payload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["algorithm", "sha256", "file_count"],
|
|
"properties": {
|
|
"algorithm": { "const": "govoplan-installed-record-payload-v1" },
|
|
"sha256": { "$ref": "#/$defs/sha256" },
|
|
"file_count": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 10000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"signature": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["algorithm", "key_id", "value"],
|
|
"properties": {
|
|
"algorithm": { "const": "ed25519" },
|
|
"key_id": { "$ref": "#/$defs/opaque_id" },
|
|
"value": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 256,
|
|
"contentEncoding": "base64"
|
|
}
|
|
}
|
|
},
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
}
|
|
}
|
|
}
|