{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/x-road-global/json-schema/x-road-global-approved-certification-service-schema.json",
  "title": "ApprovedCertificationService",
  "description": "certification service",
  "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/ApprovedCertificationService",
  "properties": {
    "id": {
      "description": "unique identifier",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "name": {
      "description": "certification service name",
      "format": "text",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "issuer_distinguished_name": {
      "description": "certificate issuer distinguished name",
      "format": "text",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "subject_distinguished_name": {
      "description": "certificate subject distinguished name",
      "format": "text",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "not_after": {
      "description": "certificate validity not after",
      "format": "date-time",
      "maxLength": 24,
      "minLength": 24,
      "type": "string"
    },
    "not_before": {
      "description": "certificate validity not before",
      "format": "date-time",
      "maxLength": 24,
      "minLength": 24,
      "type": "string"
    },
    "certificate_profile_info": {
      "description": "fully qualified class name that implements the ee.ria.xroad.common.certificateprofile.CertificateProfileInfoProvider interface",
      "format": "text",
      "minLength": 1,
      "type": "string"
    },
    "tls_auth": {
      "description": "can the CA be used for TLS authentication",
      "type": "boolean"
    },
    "default_csr_format": {
      "$ref": "#/$defs/CsrFormat"
    },
    "acme_server_directory_url": {
      "type": "string",
      "format": "url",
      "minLength": 1
    },
    "acme_server_ip_address": {
      "type": "string",
      "format": "text",
      "minLength": 1
    },
    "authentication_certificate_profile_id": {
      "format": "text",
      "type": "string",
      "minLength": 1
    },
    "signing_certificate_profile_id": {
      "format": "text",
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id",
    "tls_auth",
    "certificate_profile_info"
  ],
  "type": "object",
  "$defs": {
    "CsrFormat": {
      "description": "CSR format",
      "enum": [
        "PEM",
        "DER"
      ],
      "type": "string"
    }
  }
}