{
  "$id": "https://paulkov.github.io/dpone/schemas/gitops/airflow-artifact-attestation-publish.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "attestation_id": {
      "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])",
      "type": "string"
    },
    "changes": {
      "maxItems": 0,
      "type": "array"
    },
    "created_objects": {
      "minimum": 0,
      "type": "integer"
    },
    "deployment_id": {
      "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])",
      "type": "string"
    },
    "environment": {
      "maxLength": 512,
      "minLength": 1,
      "pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?(?![\\s\\S])",
      "type": "string"
    },
    "errors": {
      "maxItems": 0,
      "type": "array"
    },
    "existing_equal_objects": {
      "minimum": 0,
      "type": "integer"
    },
    "passed": {
      "const": true
    },
    "schema": {
      "const": "dpone.airflow-artifact-attestation-publish.v1"
    },
    "status": {
      "enum": [
        "published",
        "already_published"
      ]
    },
    "verification": {
      "additionalProperties": false,
      "properties": {
        "attestation_id": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "code": {
          "maxLength": 512,
          "minLength": 1,
          "pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?(?![\\s\\S])",
          "type": "string"
        },
        "decision": {
          "enum": [
            "verified",
            "invalid",
            "unverified"
          ]
        },
        "decision_sha256": {
          "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])",
          "type": "string"
        },
        "errors": {
          "items": {
            "type": "object"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "maxLength": 512,
          "minLength": 1,
          "pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?(?![\\s\\S])",
          "type": "string"
        },
        "policy_fingerprint": {
          "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])",
          "type": "string"
        },
        "public_key_id": {
          "anyOf": [
            {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?(?![\\s\\S])",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "public_key_sha256": {
          "anyOf": [
            {
              "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "schema": {
          "const": "dpone.airflow-artifact-attestation-verification.v1"
        },
        "verified_at": {
          "maxLength": 512,
          "minLength": 1,
          "pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?(?![\\s\\S])",
          "type": "string"
        },
        "verifier_version": {
          "anyOf": [
            {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[^\\s\\u0000-\\u001F\\u007F](?:[^\\u0000-\\u001F\\u007F]*[^\\s\\u0000-\\u001F\\u007F])?(?![\\s\\S])",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "schema",
        "decision",
        "code",
        "message",
        "decision_sha256",
        "attestation_id",
        "policy_fingerprint",
        "public_key_id",
        "public_key_sha256",
        "verifier_version",
        "verified_at",
        "errors"
      ],
      "type": "object"
    },
    "verified_objects": {
      "minimum": 3,
      "type": "integer"
    }
  },
  "required": [
    "schema",
    "passed",
    "changes",
    "status",
    "attestation_id",
    "environment",
    "deployment_id",
    "created_objects",
    "existing_equal_objects",
    "verified_objects",
    "verification",
    "errors"
  ],
  "title": "dpone GitOps immutable Airflow artifact-attestation publication receipt",
  "type": "object"
}
