{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cockroach-labs/json-schema/cockroach-labs-update-jwtissuer-body-schema.json",
  "title": "UpdateJWTIssuerRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cockroach-labs-jwt-issuers-api-openapi.yml#/components/schemas/UpdateJWTIssuerBody",
  "type": "object",
  "properties": {
    "audience": {
      "type": "string",
      "title": "The intended audience for consuming the JWT"
    },
    "claim": {
      "type": "string",
      "title": "Used to identify the user from the external Identity Provider. Defaults to \"sub\""
    },
    "identity_map": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/JWTIssuerIdentityMapEntry"
      },
      "title": "A list of mappings to map the external token identity into CockroachDB Cloud"
    },
    "issuer_url": {
      "type": "string",
      "title": "The URL of the server issuing JWTs"
    },
    "jwks": {
      "type": "string",
      "title": "A set of public keys (JWKS) used to verify a JWT"
    }
  },
  "$defs": {
    "JWTIssuerIdentityMapEntry": {
      "type": "object",
      "properties": {
        "cc_identity": {
          "description": "Specifies how to map the fetched token identity to an identity in CockroachDB Cloud. In case of a regular\nexpression for token_identity, this must contain a \\1 placeholder for the matched content. Note that you will need\nto escape the backslash in the string as in the example usage (\\\\\\\\1).\nThe mapped identity must match with either a user email address or a service account ID.",
          "type": "string"
        },
        "token_identity": {
          "description": "Specifies how to fetch external identity from the token claim. A regular expression must start\nwith a forward slash. The regular expression must be in RE2 compatible syntax. For further details, please see\nhttps://github.com/google/re2/wiki/Syntax.",
          "type": "string"
        }
      },
      "required": [
        "token_identity",
        "cc_identity"
      ],
      "title": "JWTIssuerIdentityMapEntry"
    }
  }
}