---
title: "VirtualClusterAuthenticationSchemes"
url: "https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-for-event-gateways-1/versions/f4366232-3186-4be9-93bd-be3e4b16fb19/schemas/VirtualClusterAuthenticationSchemes"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-for-event-gateways-1/versions/f4366232-3186-4be9-93bd-be3e4b16fb19.md

# VirtualClusterAuthenticationSchemes

How to handle authentication from clients. It tries to authenticate with every rule sequentially one by one. It succeeds on the first match, and fails if no rule matches.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Control Planes Configuration for Event Gateways
  version: 1.0.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    VirtualClusterAuthenticationScheme:
      discriminator:
        propertyName: type
        mapping:
          anonymous: "#/components/schemas/VirtualClusterAuthenticationAnonymous"
          sasl_plain: "#/components/schemas/VirtualClusterAuthenticationSaslPlain"
          sasl_scram: "#/components/schemas/VirtualClusterAuthenticationSaslScram"
          oauth_bearer: "#/components/schemas/VirtualClusterAuthenticationOauthBearer"
          client_certificate: "#/components/schemas/VirtualClusterAuthenticationClientCertificate"
      oneOf:
        - $ref: "#/components/schemas/VirtualClusterAuthenticationAnonymous"
        - $ref: "#/components/schemas/VirtualClusterAuthenticationSaslPlain"
        - $ref: "#/components/schemas/VirtualClusterAuthenticationSaslScram"
        - $ref: "#/components/schemas/VirtualClusterAuthenticationOauthBearer"
        - $ref: "#/components/schemas/VirtualClusterAuthenticationClientCertificate"
    VirtualClusterAuthenticationAnonymous:
      type: object
      properties:
        type:
          type: string
          enum:
            - anonymous
          x-terraform-transform-const: true
      required:
        - type
    VirtualClusterAuthenticationSaslPlain:
      description: >
        SASL/PLAIN authentication scheme for the virtual cluster containing
        principals with username and password.
      type: object
      properties:
        type:
          type: string
          enum:
            - sasl_plain
          x-terraform-transform-const: true
        mediation:
          description: The mediation type for SASL/PLAIN authentication.
          type: string
          enum:
            - passthrough
            - terminate
        principals:
          description: List of principals to be able to authenticate with, used with
            `terminate` mediation.
          type: array
          items:
            $ref: "#/components/schemas/VirtualClusterAuthenticationPrincipal"
          minItems: 1
      additionalProperties: false
      required:
        - type
        - mediation
    VirtualClusterAuthenticationSaslScram:
      description: SASL/SCRAM authentication scheme for the virtual cluster.
      type: object
      properties:
        type:
          type: string
          enum:
            - sasl_scram
          x-terraform-transform-const: true
        algorithm:
          description: The algorithm used for SASL/SCRAM authentication.
          type: string
          enum:
            - sha256
            - sha512
      additionalProperties: false
      required:
        - type
        - algorithm
    VirtualClusterAuthenticationOauthBearer:
      description: Oauth Bearer authentication scheme for the virtual cluster.
      type: object
      properties:
        type:
          type: string
          enum:
            - oauth_bearer
          x-terraform-transform-const: true
        mediation:
          description: >
            Methods to mediate authentication:

            * passthrough - pass authentication from the client through proxy to
            the backend cluster without any kind of
              validation
            * validate_forward - pass authentication from the client through
            proxy to the backend cluster.
              Proxy does the validation before forwarding it to the client.
            * terminate - terminate authentication at the proxy level and
            originate authentication to the backend cluster
              using the configuration defined at BackendCluster's authentication.
              SASL auth is not originated if authentication on the backend_cluster is not configured.
          type: string
          enum:
            - passthrough
            - validate_forward
            - terminate
        claims_mapping:
          $ref: "#/components/schemas/VirtualClusterAuthenticationClaimsMapping"
        jwks:
          $ref: "#/components/schemas/VirtualClusterAuthenticationJWKS"
        validate:
          $ref: "#/components/schemas/VirtualClusterAuthenticationValidate"
      additionalProperties: false
      required:
        - type
        - mediation
    VirtualClusterAuthenticationClientCertificate:
      description: |-
        Client certificate (mTLS) authentication scheme for the virtual cluster.

        **Requires a minimum runtime version of `1.1`**.
      type: object
      properties:
        type:
          type: string
          enum:
            - client_certificate
          x-terraform-transform-const: true
      example:
        type: client_certificate
      additionalProperties: false
      required:
        - type
      x-min-runtime-version: "1.1"
    VirtualClusterAuthenticationPrincipal:
      description: A principal for authentication containing username and password.
      type: object
      properties:
        username:
          $ref: "#/components/schemas/GatewaySecretReferenceOrLiteral"
        password:
          $ref: "#/components/schemas/GatewaySecret"
      required:
        - username
        - password
    VirtualClusterAuthenticationClaimsMapping:
      description: Maps JWT claims in the case when sub and scope are presented as
        different claims in your JWT token.
      type: object
      properties:
        sub:
          description: Maps the subject claim.
          type: string
          minLength: 1
        scope:
          description: Maps the scope claim.
          type: string
          minLength: 1
    VirtualClusterAuthenticationJWKS:
      description: JSON Web Key Set configuration for verifying token signatures.
      type: object
      properties:
        endpoint:
          description: URL for JWKS endpoint.
          type: string
          format: uri
          minLength: 1
        timeout:
          description: Total time from establishing connection to receive a response from
            JWKS endpoint.
          type: string
          default: 10s
        cache_expiration:
          description: Duration after which the gateway will fetch and cache JWKS.
          type: string
          default: 1h
      required:
        - endpoint
    VirtualClusterAuthenticationValidate:
      description: Validation rules.
      type: object
      properties:
        audiences:
          description: List of expected audience values. One of them has to match the
            audience claim in the token.
          type: array
          items:
            $ref: "#/components/schemas/VirtualClusterAuthenticationAudience"
          minItems: 1
        issuer:
          description: Expected token issuer in the token.
          type: string
          minLength: 1
    GatewaySecretReferenceOrLiteral:
      description: >
        A literal value or a reference to an existing secret as a template
        string expression.

        The value is stored and returned by the API as-is, not treated as
        sensitive information.
      type: string
      minLength: 1
      x-examples:
        reference:
          summary: Reference to a secret
          value: ${vault.env['MY_ENV_VAR']}
        literal:
          summary: Literal value
          value: my-literal-value
      x-expression:
        type: string
        fields:
          - vault
    GatewaySecret:
      description: >
        A sensitive value containing the secret or a reference to a secret as a
        template string expression.

        If the value is provided as plain text, it is encrypted at rest and
        omitted from API responses.

        If provided as an expression, the expression itself is stored and
        returned by the API.
      type: string
      example: ${vault.env['MY_ENV_VAR']}
      minLength: 1
      x-expression:
        type: string
        fields:
          - vault
      x-sensitive: true
    VirtualClusterAuthenticationAudience:
      type: object
      properties:
        name:
          type: string
          minLength: 1
      required:
        - name
    VirtualClusterAuthenticationSchemes:
      description: |
        How to handle authentication from clients.

        It tries to authenticate with every rule sequentially one by one.
        It succeeds on the first match, and fails if no rule matches.
      type: array
      items:
        $ref: "#/components/schemas/VirtualClusterAuthenticationScheme"
      minItems: 1
```
