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

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

# ACL

Apply Kafka ACLs to virtual cluster traffic.

## 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:
    Labels:
      description: >
        Labels store metadata of an entity that can be used for filtering an
        entity list or for searching across entity types. 


        Keys must be of length 1-63 characters, and cannot start with "kong",
        "konnect", "mesh", "kic", or "_".
      type: object
      example:
        env: test
      additionalProperties:
        type: string
        pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$
        minLength: 1
        maxLength: 63
      maxProperties: 50
      title: Labels
    EventGatewayACLPolicyConfig:
      description: Apply ACLs to virtual cluster traffic.
      type: object
      properties:
        rules:
          description: Every ACL rule in this list applies independently.
          type: array
          items:
            $ref: "#/components/schemas/EventGatewayACLRule"
          minItems: 1
      required:
        - rules
    EventGatewayACLRule:
      description: A Kafka ACL rule to apply to virtual cluster traffic
      type: object
      properties:
        resource_type:
          description: This rule applies to access only for type of resource
          type: string
          enum:
            - topic
            - group
            - transactional_id
            - cluster
        action:
          description: How to handle the request if the rule matches
          type: string
          enum:
            - allow
            - deny
        operations:
          description: Types of Kafka operations to match against. Note that not every
            operation can apply to every resource type.
          type: array
          items:
            $ref: "#/components/schemas/EventGatewayACLOperation"
        resource_names:
          description: If any of these entries match, the resource name matches for this
            rule. A maximum of 50 entries are allowed.
          oneOf:
            - $ref: "#/components/schemas/EventGatewayACLRuleResourceNamesStaticArray"
            - $ref: "#/components/schemas/EventGatewayACLRuleResourceNamesDynamicArray"
      required:
        - resource_type
        - action
        - operations
        - resource_names
    EventGatewayACLOperation:
      description: An Event Gateway operation to match against in an ACL rule.
      type: object
      properties:
        name:
          type: string
          enum:
            - all
            - alter
            - alter_configs
            - create
            - delete
            - describe
            - describe_configs
            - idempotent_write
            - read
            - write
      required:
        - name
    EventGatewayACLRuleResourceNamesStaticArray:
      description: A static list of resource name globs to match against resources
        when applying an ACL policy.
      type: array
      items:
        $ref: "#/components/schemas/EventGatewayACLResourceName"
      example:
        - match: orders-*
        - match: payments-*
      maxItems: 50
    EventGatewayACLRuleResourceNamesDynamicArray:
      description: >-
        This expression should evaluate to an array of glob patterns,

        equivalent to the `match` values in the static array form of
        `resource_names`.


        **Requires a minimum runtime version of `1.1`**.
      type: string
      example: context.auth.token.claims["topics"]
      x-expression:
        type: array
        items:
          type: string
        fields:
          - name: context.auth.principal.name
            type: string
            description: Name of authenticated principal. Username in case of PLAIN/SCRAM,
              `sub` claim in case of OAUTHBEARER.
          - name: context.auth.type
            type: string
            description: >
              The matched authentication type from a virtual cluster: anonymous,
              sasl_plain, sasl_scram_sha256, sasl_scram_sha512,
              sasl_oauth_bearer.
          - name: context.auth.token.claims
            type: object
            description: All claims from the JWT token. Only populated for sasl_oauth_bearer
              authentication. Claims can be strings, numbers, booleans, arrays
              or nested JSON objects.
      x-min-runtime-version: "1.1"
    EventGatewayACLResourceName:
      description: An Event Gateway resource name to match against in an ACL rule.
      type: object
      properties:
        match:
          description: >
            Currently supported are exact matches and globs.

            All `*` characters are interpreted as globs, i.e. they match zero or
            more of any character.
          type: string
          format: glob
      required:
        - match
    EventGatewayACLsPolicy:
      description: Apply Kafka ACLs to virtual cluster traffic.
      type: object
      properties:
        type:
          description: The type name of the policy.
          type: string
          enum:
            - acls
          maxLength: 255
          minLength: 1
          x-terraform-transform-const: true
        name:
          description: A unique user-defined name of the policy.
          type: string
          maxLength: 255
          x-unicode-pattern: ^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+']*[\p{L}\p{N}]$
        description:
          description: A human-readable description of the policy.
          type: string
          default: ""
          maxLength: 512
        enabled:
          description: Whether the policy is enabled.
          type: boolean
          default: true
        labels:
          $ref: "#/components/schemas/Labels"
        config:
          description: The configuration of the policy.
          type: object
          $ref: "#/components/schemas/EventGatewayACLPolicyConfig"
        condition:
          description: A string containing the boolean expression that determines whether
            the policy is applied.
          type: string
          example: context.auth.principal.name == "this-user"
          default: ""
          maxLength: 1000
          x-expression:
            type: boolean
            fields:
              - name: context.auth.principal.name
                type: string
                description: Name of authenticated principal. Username in case of PLAIN/SCRAM,
                  `sub` claim in case of OAUTHBEARER.
              - name: context.auth.type
                type: string
                description: >
                  The matched authentication type from a virtual cluster:
                  anonymous, sasl_plain, sasl_scram_sha256, sasl_scram_sha512,
                  sasl_oauth_bearer.
      required:
        - type
        - config
      title: ACL
```
