{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-certificate-manager/json-schema/google-cloud-certificate-manager-trust-config-schema.json",
  "title": "TrustConfig",
  "description": "Defines a trust config.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-certificate-manager-certificatemanager-projects-api-openapi.yml#/components/schemas/TrustConfig",
  "properties": {
    "labels": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "description": "Optional. Set of labels associated with a TrustConfig."
    },
    "etag": {
      "type": "string",
      "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding."
    },
    "createTime": {
      "format": "google-datetime",
      "description": "Output only. The creation timestamp of a TrustConfig.",
      "readOnly": true,
      "type": "string"
    },
    "description": {
      "description": "Optional. One or more paragraphs of text description of a TrustConfig.",
      "type": "string"
    },
    "trustStores": {
      "items": {
        "$ref": "#/$defs/TrustStore"
      },
      "description": "Optional. Set of trust stores to perform validation against. This field is supported when TrustConfig is configured with Load Balancers, currently not supported for SPIFFE certificate validation. Only one TrustStore specified is currently allowed.",
      "type": "array"
    },
    "spiffeTrustStores": {
      "description": "Optional. Defines a mapping from a trust domain to a TrustStore. This is used for SPIFFE certificate validation.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/TrustStore"
      }
    },
    "allowlistedCertificates": {
      "description": "Optional. A certificate matching an allowlisted certificate is always considered valid as long as the certificate is parseable, proof of private key possession is established, and constraints on the certificate's SAN field are met.",
      "items": {
        "$ref": "#/$defs/AllowlistedCertificate"
      },
      "type": "array"
    },
    "tags": {
      "description": "Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: \"123/environment\": \"production\", \"123/costCenter\": \"marketing\"",
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    },
    "name": {
      "description": "Identifier. A user-defined name of the trust config. TrustConfig names must be unique globally and match pattern `projects/*/locations/*/trustConfigs/*`.",
      "type": "string"
    },
    "updateTime": {
      "type": "string",
      "description": "Output only. The last update timestamp of a TrustConfig.",
      "format": "google-datetime",
      "readOnly": true
    }
  },
  "type": "object",
  "$defs": {
    "AllowlistedCertificate": {
      "type": "object",
      "properties": {
        "pemCertificate": {
          "type": "string",
          "description": "Required. PEM certificate that is allowlisted. The certificate can be up to 5k bytes, and must be a parseable X.509 certificate."
        }
      },
      "description": "Defines an allowlisted certificate."
    },
    "IntermediateCA": {
      "type": "object",
      "properties": {
        "pemCertificate": {
          "description": "PEM intermediate certificate used for building up paths for validation. Each certificate provided in PEM format may occupy up to 5kB.",
          "type": "string"
        }
      },
      "description": "Defines an intermediate CA."
    },
    "TrustAnchor": {
      "description": "Defines a trust anchor.",
      "type": "object",
      "properties": {
        "pemCertificate": {
          "description": "PEM root certificate of the PKI used for validation. Each certificate provided in PEM format may occupy up to 5kB.",
          "type": "string"
        }
      }
    },
    "TrustStore": {
      "type": "object",
      "description": "Defines a trust store.",
      "properties": {
        "intermediateCas": {
          "items": {
            "$ref": "#/$defs/IntermediateCA"
          },
          "description": "Optional. Set of intermediate CA certificates used for the path building phase of chain validation. The field is currently not supported if TrustConfig is used for the workload certificate feature.",
          "type": "array"
        },
        "trustAnchors": {
          "description": "Optional. List of Trust Anchors to be used while performing validation against a given TrustStore.",
          "items": {
            "$ref": "#/$defs/TrustAnchor"
          },
          "type": "array"
        }
      }
    }
  }
}