126 lines
3.9 KiB
JSON
126 lines
3.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://govoplan.add-ideas.de/schemas/runtime-distribution-manifest-v1.json",
|
|
"title": "GovOPlaN runtime distribution manifest",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_version",
|
|
"channel",
|
|
"sequence",
|
|
"version",
|
|
"issued_at",
|
|
"expires_at",
|
|
"revoked",
|
|
"deployer",
|
|
"package_lock",
|
|
"images",
|
|
"dependencies",
|
|
"composition",
|
|
"signatures"
|
|
],
|
|
"properties": {
|
|
"schema_version": { "const": "1" },
|
|
"channel": { "type": "string", "pattern": "^[a-z][a-z0-9_]{1,63}$" },
|
|
"sequence": { "type": "integer", "minimum": 1 },
|
|
"version": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
"issued_at": { "type": "string", "format": "date-time" },
|
|
"expires_at": { "type": "string", "format": "date-time" },
|
|
"revoked": { "const": false },
|
|
"deployer": { "$ref": "#/$defs/artifact" },
|
|
"package_lock": { "$ref": "#/$defs/artifact" },
|
|
"images": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["api", "web"],
|
|
"properties": {
|
|
"api": { "$ref": "#/$defs/image" },
|
|
"web": { "$ref": "#/$defs/image" }
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"propertyNames": { "pattern": "^[a-z][a-z0-9_]{1,63}$" },
|
|
"additionalProperties": { "$ref": "#/$defs/imageReference" }
|
|
},
|
|
"composition": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["sha256", "module_ids", "packages"],
|
|
"properties": {
|
|
"sha256": { "$ref": "#/$defs/sha256" },
|
|
"module_ids": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": { "type": "string", "pattern": "^[a-z][a-z0-9_]{1,63}$" }
|
|
},
|
|
"packages": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["name", "version", "wheel_sha256"],
|
|
"properties": {
|
|
"name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
"version": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
"wheel_sha256": { "$ref": "#/$defs/sha256" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"signatures": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["key_id", "algorithm", "value"],
|
|
"properties": {
|
|
"key_id": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
"algorithm": { "const": "ed25519" },
|
|
"value": { "type": "string", "minLength": 1, "maxLength": 256 }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
"imageReference": {
|
|
"type": "string",
|
|
"pattern": "^[^@\\s]+@sha256:[0-9a-f]{64}$",
|
|
"maxLength": 300
|
|
},
|
|
"artifact": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["url", "sha256"],
|
|
"properties": {
|
|
"url": { "type": "string", "format": "uri", "pattern": "^https://" },
|
|
"sha256": { "$ref": "#/$defs/sha256" }
|
|
}
|
|
},
|
|
"image": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["index", "platforms", "sbom", "provenance"],
|
|
"properties": {
|
|
"index": { "$ref": "#/$defs/imageReference" },
|
|
"platforms": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["linux/amd64", "linux/arm64"],
|
|
"properties": {
|
|
"linux/amd64": { "$ref": "#/$defs/imageReference" },
|
|
"linux/arm64": { "$ref": "#/$defs/imageReference" }
|
|
}
|
|
},
|
|
"sbom": { "$ref": "#/$defs/artifact" },
|
|
"provenance": { "$ref": "#/$defs/artifact" }
|
|
}
|
|
}
|
|
}
|
|
}
|