{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/x-road-global/json-schema/x-road-global-configuration-signing-key-schema.json",
  "title": "ConfigurationSigningKey",
  "description": "Signing context (key identifier used by the signer and signing certificate) for signing the global configuration. Also includes the possible actions that can be done to this object, e.g DELETE (only for key related operations and does not consider user authorization).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/x-road-global-central-server-admin-openapi.yml#/components/schemas/ConfigurationSigningKey",
  "properties": {
    "active": {
      "description": "if the key is active",
      "type": "boolean"
    },
    "available": {
      "description": "if the key is available",
      "type": "boolean"
    },
    "created_at": {
      "description": "configuration signing key created at",
      "format": "date-time",
      "maxLength": 24,
      "minLength": 24,
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "unique identifier",
      "minLength": 1
    },
    "key_hash": {
      "description": "key hash",
      "format": "text",
      "minLength": 1,
      "readOnly": true,
      "type": "string"
    },
    "token_id": {
      "type": "string",
      "format": "text",
      "description": "token id",
      "minLength": 1,
      "readOnly": true
    },
    "label": {
      "$ref": "#/$defs/KeyLabel"
    },
    "possible_actions": {
      "description": "array containing the possible actions that can be done for this item",
      "items": {
        "$ref": "#/$defs/PossibleKeyAction"
      },
      "type": "array"
    },
    "source_type": {
      "$ref": "#/$defs/ConfigurationType"
    },
    "key_algorithm": {
      "$ref": "#/$defs/KeyAlgorithm"
    }
  },
  "required": [
    "id",
    "label",
    "created_at",
    "active",
    "available",
    "possible_actions"
  ],
  "type": "object",
  "$defs": {
    "ConfigurationType": {
      "description": "configuration type",
      "enum": [
        "INTERNAL",
        "EXTERNAL"
      ],
      "type": "string"
    },
    "KeyAlgorithm": {
      "description": "Key type",
      "enum": [
        "RSA",
        "EC"
      ],
      "type": "string"
    },
    "KeyLabel": {
      "properties": {
        "label": {
          "description": "label for the new key",
          "format": "text",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "type": "object"
    },
    "PossibleKeyAction": {
      "description": "an action to change state or edit keys",
      "enum": [
        "DELETE",
        "ACTIVATE"
      ],
      "type": "string"
    }
  }
}