Kafka Consume 플러그인 구성 레퍼런스
Kafka Consume 플러그인 구성 레퍼런스 (Kafka Consume Plugin Configuration Reference)
이 문서는 Kong Gateway의 Kafka Consume 플러그인에서 사용할 수 있는 구성 항목을 하나하나 정리한 레퍼런스예요. JSON 스키마 형태로 각 필드의 설명, 타입, 기본값을 한눈에 확인할 수 있어요. 특히 PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, OAUTHBEARER 같은 SASL 인증 메커니즘과 OAuth2 토큰 엔드포인트 설정이 자세히 설명되어 있어요. 어떤 필드가 볼트 참조나 암호화를 지원하는지도 함께 표시되어 있으니 설정 전에 꼭 살펴보세요
출처: 문서
본문
{
"properties": {
"config": {
"properties": {
"authentication": {
"properties": {
"mechanism": {
"description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, `SCRAM-SHA-512`, or `OAUTHBEARER`.",
"enum": [
"OAUTHBEARER",
"PLAIN",
"SCRAM-SHA-256",
"SCRAM-SHA-512"
],
"type": "string"
},
"oauthbearer": {
"description": "Options for SASL OAUTHBEARER authentication. Required when `mechanism` is `OAUTHBEARER`.",
"properties": {
"client_id": {
"description": "The OAuth2 client ID. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
},
"client_secret": {
"description": "The OAuth2 client secret. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"extensions": {
"additionalProperties": {
"type": "string"
},
"description": "Key-value pairs sent as extensions in the OAUTHBEARER SASL handshake (e.g. logicalCluster, identityPoolId).",
"type": "object"
},
"scopes": {
"description": "List of OAuth2 scopes to request.",
"items": {
"type": "string"
},
"type": "array"
},
"token_endpoint_tls_verify": {
"default": true,
"description": "Whether to verify the TLS certificate of the token endpoint.",
"type": "boolean"
},
"token_endpoint_url": {
"description": "The URL of the OAuth2 token endpoint. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
}
},
"type": "object"
},
"password": {
"description": "Password for SASL authentication. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"strategy": {
"description": "The authentication strategy for the plugin, the only option for the value is `sasl`.",
"enum": [
"sasl"
],
"type": "string"
},
"tokenauth": {
"description": "Enable this to indicate `DelegationToken` authentication",
"type": "boolean"
},
"user": {
"description": "Username for SASL authentication. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
}
},
"type": "object"
},
"auto_offset_reset": {
"default": "latest",
"description": "The offset to start from when there is no initial offset in the consumer group.",
"enum": [
"earliest",
"latest"
],
"type": "string"
},
"bootstrap_servers": {
"description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.",
"items": {
"properties": {
"host": {
"description": "A string representing a host name, such as example.com.",
"type": "string"
},
"port": {
"description": "An integer representing a port number between 0 and 65535, inclusive.",
"maximum": 65535,
"minimum": 0,
"type": "integer"
}
},
"required": [
"host",
"port"
],
"type": "object"
},
"type": "array"
},
"cluster_name": {
"description": "An identifier for the Kafka cluster.",
"type": "string"
},
"commit_strategy": {
"default": "auto",
"description": "The strategy to use for committing offsets.",
"enum": [
"auto",
"off"
],
"type": "string"
},
"consumer_group": {
"description": "Configuration for the Kafka consumer group ID.",
"properties": {
"consumer_group_id": {
"description": "The fixed consumer group ID to use when mode is set to `manual`. For SSE and WebSocket modes, a `.<node_id>` suffix is automatically appended.",
"type": "string"
},
"mode": {
"default": "random",
"description": "The strategy to determine the consumer group ID. `random`: a hash `com.konghq.kafka.<md5>` over the plugin ID (plus consumer identifier/IP and node ID for SSE/WebSocket). `kong_consumer`: uses the authenticated consumer's `username`, `custom_id`, then `id`, directly; falls back to `random` if no consumer is authenticated. `manual`: uses `consumer_group_id` directly. For SSE/WebSocket, `manual` and `kong_consumer` group IDs get a `.<node_id>` suffix.",
"enum": [
"kong_consumer",
"manual",
"random"
],
"type": "string"
}
},
"type": "object"
},
"dlq_topic": {
"description": "The topic to use for the Dead Letter Queue.",
"type": "string"
},
"enable_dlq": {
"description": "Enables Dead Letter Queue. When enabled, if the message doesn't conform to the schema (from Schema Registry) or there's an error in the `message_by_lua_functions`, it will be forwarded to `dlq_topic` that can be processed later.",
"type": "boolean"
},
"enforce_latest_offset_reset": {
"default": false,
"description": "When true, 'latest' offset reset behaves correctly (starts from end). When false (default), maintains backwards compatibility where 'latest' acts like 'earliest'.",
"type": "boolean"
},
"error_handling": {
"properties": {
"return_error_message": {
"default": false,
"description": "When enabled, the Kafka client error message is returned to the HTTP client. Useful for debugging but may expose internal details, so should be disabled in production.",
"type": "boolean"
}
},
"type": "object"
},
"message_by_lua_functions": {
"description": "The Lua functions that manipulates the message being sent to the client.",
"items": {
"type": "string"
},
"type": "array"
},
"message_deserializer": {
"default": "noop",
"description": "The deserializer to use for the consumed messages.",
"enum": [
"json",
"noop"
],
"type": "string"
},
"mode": {
"default": "http-get",
"description": "The mode of operation for the plugin.",
"enum": [
"http-get",
"server-sent-events",
"websocket"
],
"type": "string"
},
"schema_registry": {
"description": "The plugin-global schema registry configuration.",
"properties": {
"confluent": {
"properties": {
"authentication": {
"properties": {
"basic": {
"properties": {
"password": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"username": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
}
},
"required": [
"password",
"username"
],
"type": "object"
},
"identity_pool_id": {
"description": "The Confluent Cloud OAuth identity pool ID, sent as the `Confluent-Identity-Pool-Id` request header. Optional: if omitted, Confluent Cloud automatically maps an identity pool based on the token's claims.",
"type": "string"
},
"logical_cluster_id": {
"description": "The Confluent Cloud Schema Registry cluster ID, sent as the `target-sr-cluster` request header. Confluent Cloud requires this when `mode` is 'oauth2'.",
"type": "string"
},
"mode": {
"default": "none",
"description": "Authentication mode to use with the schema registry.",
"enum": [
"basic",
"none",
"oauth2"
],
"type": "string"
},
"oauth2": {
"properties": {
"audience": {
"default": [],
"description": "List of audiences passed to the IdP when obtaining a new token.",
"items": {
"type": "string"
},
"type": "array"
},
"client_id": {
"description": "The client ID for the application registration in the IdP. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"client_secret": {
"description": "The client secret for the application registration in the IdP. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"grant_type": {
"default": "client_credentials",
"description": "The OAuth grant type to be used.",
"enum": [
"client_credentials",
"password"
],
"type": "string"
},
"password": {
"description": "The password to use if `config.oauth.grant_type` is set to `password`. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"scopes": {
"default": [
"openid"
],
"description": "List of scopes to request from the IdP when obtaining a new token.",
"items": {
"type": "string"
},
"type": "array"
},
"token_endpoint": {
"description": "The token endpoint URI.",
"type": "string"
},
"token_headers": {
"additionalProperties": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
},
"description": "Extra headers to be passed in the token endpoint request. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "object"
},
"token_post_args": {
"additionalProperties": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
},
"description": "Extra post arguments to be passed in the token endpoint request. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "object"
},
"username": {
"description": "The username to use if `config.oauth.grant_type` is set to `password`. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
}
},
"required": [
"token_endpoint"
],
"type": "object"
},
"oauth2_client": {
"properties": {
"auth_method": {
"default": "client_secret_post",
"description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.",
"enum": [
"client_secret_basic",
"client_secret_jwt",
"client_secret_post",
"none"
],
"type": "string"
},
"client_secret_jwt_alg": {
"default": "HS512",
"description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.",
"enum": [
"HS256",
"HS512"
],
"type": "string"
},
"http_proxy": {
"description": "The proxy to use when making HTTP requests to the IdP.",
"type": "string"
},
"http_proxy_authorization": {
"description": "The `Proxy-Authorization` header value to be used with `http_proxy`.",
"type": "string"
},
"http_version": {
"default": 1.1,
"description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.",
"type": "number"
},
"https_proxy": {
"description": "The proxy to use when making HTTPS requests to the IdP.",
"type": "string"
},
"https_proxy_authorization": {
"description": "The `Proxy-Authorization` header value to be used with `https_proxy`.",
"type": "string"
},
"keep_alive": {
"default": true,
"description": "Whether to use keepalive connections to the IdP.",
"type": "boolean"
},
"no_proxy": {
"description": "A comma-separated list of hosts that should not be proxied.",
"type": "string"
},
"ssl_verify": {
"default": true,
"description": "Whether to verify the certificate presented by the IdP when using HTTPS.",
"type": "boolean"
},
"timeout": {
"default": 10000,
"description": "Network I/O timeout for requests to the IdP in milliseconds.",
"maximum": 2147483646,
"minimum": 0,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"ssl_verify": {
"default": true,
"description": "Set to false to disable SSL certificate verification when connecting to the schema registry.",
"type": "boolean"
},
"ttl": {
"description": "The TTL in seconds for the schema registry cache.",
"maximum": 3600,
"minimum": 0,
"type": "number"
},
"url": {
"description": "The URL of the schema registry.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"security": {
"properties": {
"certificate_id": {
"description": "UUID of certificate entity for mTLS authentication.",
"type": "string"
},
"ssl": {
"description": "Enables TLS.",
"type": "boolean"
},
"ssl_verify": {
"default": true,
"description": "When using TLS, this option enables verification of the certificate presented by the server.",
"type": "boolean"
}
},
"type": "object"
},
"topics": {
"description": "The Kafka topics and their configuration you want to consume from.",
"items": {
"properties": {
"name": {
"type": "string"
},
"schema_registry": {
"description": "The plugin-global schema registry configuration.",
"properties": {
"confluent": {
"properties": {
"authentication": {
"properties": {
"basic": {
"properties": {
"password": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"username": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
}
},
"required": [
"password",
"username"
],
"type": "object"
},
"identity_pool_id": {
"description": "The Confluent Cloud OAuth identity pool ID, sent as the `Confluent-Identity-Pool-Id` request header. Optional: if omitted, Confluent Cloud automatically maps an identity pool based on the token's claims.",
"type": "string"
},
"logical_cluster_id": {
"description": "The Confluent Cloud Schema Registry cluster ID, sent as the `target-sr-cluster` request header. Confluent Cloud requires this when `mode` is 'oauth2'.",
"type": "string"
},
"mode": {
"default": "none",
"description": "Authentication mode to use with the schema registry.",
"enum": [
"basic",
"none",
"oauth2"
],
"type": "string"
},
"oauth2": {
"properties": {
"audience": {
"default": [],
"description": "List of audiences passed to the IdP when obtaining a new token.",
"items": {
"type": "string"
},
"type": "array"
},
"client_id": {
"description": "The client ID for the application registration in the IdP. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"client_secret": {
"description": "The client secret for the application registration in the IdP. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"grant_type": {
"default": "client_credentials",
"description": "The OAuth grant type to be used.",
"enum": [
"client_credentials",
"password"
],
"type": "string"
},
"password": {
"description": "The password to use if `config.oauth.grant_type` is set to `password`. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
},
"scopes": {
"default": [
"openid"
],
"description": "List of scopes to request from the IdP when obtaining a new token.",
"items": {
"type": "string"
},
"type": "array"
},
"token_endpoint": {
"description": "The token endpoint URI.",
"type": "string"
},
"token_headers": {
"additionalProperties": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
},
"description": "Extra headers to be passed in the token endpoint request. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "object"
},
"token_post_args": {
"additionalProperties": {
"description": "\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "string",
"x-referenceable": true
},
"description": "Extra post arguments to be passed in the token endpoint request. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
"type": "object"
},
"username": {
"description": "The username to use if `config.oauth.grant_type` is set to `password`. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
"type": "string",
"x-encrypted": true,
"x-referenceable": true
}
},
"required": [
"token_endpoint"
],
"type": "object"
},
"oauth2_client": {
"properties": {
"auth_method": {
"default": "client_secret_post",
"description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.",
"enum": [
"client_secret_basic",
"client_secret_jwt",
"client_secret_post",
"none"
],
"type": "string"
},
"client_secret_jwt_alg": {
"default": "HS512",
"description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.",
"enum": [
"HS256",
"HS512"
],
"type": "string"
},
"http_proxy": {
"description": "The proxy to use when making HTTP requests to the IdP.",
"type": "string"
},
"http_proxy_authorization": {
"description": "The `Proxy-Authorization` header value to be used with `http_proxy`.",
"type": "string"
},
"http_version": {
"default": 1.1,
"description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.",
"type": "number"
},
"https_proxy": {
"description": "The proxy to use when making HTTPS requests to the IdP.",
"type": "string"
},
"https_proxy_authorization": {
"description": "The `Proxy-Authorization` header value to be used with `https_proxy`.",
"type": "string"
},
"keep_alive": {
"default": true,
"description": "Whether to use keepalive connections to the IdP.",
"type": "boolean"
},
"no_proxy": {
"description": "A comma-separated list of hosts that should not be proxied.",
"type": "string"
},
"ssl_verify": {
"default": true,
"description": "Whether to verify the certificate presented by the IdP when using HTTPS.",
"type": "boolean"
},
"timeout": {
"default": 10000,
"description": "Network I/O timeout for requests to the IdP in milliseconds.",
"maximum": 2147483646,
"minimum": 0,
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"ssl_verify": {
"default": true,
"description": "Set to false to disable SSL certificate verification when connecting to the schema registry.",
"type": "boolean"
},
"ttl": {
"description": "The TTL in seconds for the schema registry cache.",
"maximum": 3600,
"minimum": 0,
"type": "number"
},
"url": {
"description": "The URL of the schema registry.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"required": [
"name"
],
"type": "object"
},
"minLength": 1,
"type": "array"
}
},
"required": [
"bootstrap_servers",
"topics"
],
"type": "object"
},
"consumer": {
"additionalProperties": false,
"description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"expressions": {
"additionalProperties": true,
"type": "object"
},
"protocols": {
"default": [
"grpc",
"grpcs",
"http",
"https",
"ws",
"wss"
],
"description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.",
"items": {
"enum": [
"grpc",
"grpcs",
"http",
"https",
"ws",
"wss"
],
"type": "string"
},
"type": "array"
},
"route": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"config"
]
}
번역할 문서 조각이 아직 첨부되지 않았어요. Kong 문서 내용(마크다운 원문)을 보내주시면 규칙에 맞게 바로 번역해 드릴게요.
관련 리소스
더 알아보기 (Learn more)
- Kafka 클러스터를 업스트림으로 연결해 요청을 프록시하는 플러그인 — Kafka Upstream plugin
- 처리 결과를 Kafka 토픽으로 전송하는 로깅 플러그인 — Kafka Log plugin
- Confluent Kafka 토픽에서 메시지를 소비하는 플러그인 — Confluent Consume plugin
- Confluent Kafka로 메시지를 전송하는 플러그인 — Confluent plugin
- 볼트에 저장한 시크릿을 필드 값으로 참조하는 방법 — referenceable
- 키링으로 민감한 필드 값을 암호화하는 방식 — encrypted