{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-keystore-schema.json",
  "title": "Keystore",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-organization-resources-api-openapi.yml#/components/schemas/Keystore",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "keystore"
      ]
    },
    "api_version": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "2.0.0"
      ]
    },
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "title": {
      "type": "string",
      "maxLength": 1023
    },
    "summary": {
      "type": "string",
      "maxLength": 65535
    },
    "key_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name for the primary key+certificate pair, auto-generated from certificate or user-provided"
    },
    "private_key_entry": {
      "type": "string",
      "format": "password"
    },
    "public_certificate_entry": {
      "$ref": "#/$defs/CertEntry"
    },
    "public_key_jwk": {
      "$ref": "#/$defs/PublicKeyJwk"
    },
    "trusted_certificate_entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CertEntry"
      }
    },
    "key_entries": {
      "type": [
        "array",
        "null"
      ],
      "description": "Additional key+certificate pairs beyond the first (for multi-key keystores)",
      "items": {
        "type": "object",
        "required": [
          "key_name",
          "private_key_entry",
          "public_certificate_entry"
        ],
        "properties": {
          "key_name": {
            "type": "string",
            "description": "Name for this key+certificate pair, auto-generated from certificate CN or user-provided"
          },
          "private_key_entry": {
            "type": "string",
            "format": "password",
            "description": "Private key in PEM format"
          },
          "public_certificate_entry": {
            "$ref": "#/$defs/CertEntry"
          },
          "trusted_certificate_entries": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/$defs/CertEntry"
            },
            "description": "CA certificate chain for this key+certificate pair"
          }
        }
      }
    },
    "keystore": {
      "type": "string"
    },
    "password": {
      "type": "string",
      "format": "password"
    },
    "tls_server_profile_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "tls_client_profile_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "cloud_setting_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "url": {
      "type": "string",
      "readOnly": true,
      "format": "uri"
    }
  },
  "$defs": {
    "CertEntry": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "pem": {
          "type": "string"
        },
        "certificate_info": {
          "type": "string"
        }
      }
    },
    "PublicKeyJwk": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "kty": {
          "type": "string"
        },
        "n": {
          "type": "string"
        },
        "e": {
          "type": "string"
        },
        "alg": {
          "type": "string"
        },
        "kid": {
          "type": "string"
        },
        "use": {
          "type": "string"
        }
      }
    }
  }
}