Kafka 로그 플러그인 구성 참조
Kafka 로그 플러그인 구성 참조 (Kafka Log Plugin Configuration Reference)
이 문서는 Kong의 Kafka 로그 플러그인 설정에 대한 참조를 제공해요. 인증 메커니즘과 OAUTHBEARER 옵션 등 상세한 구성 방법을 설명하고 있어요. 각 필드의 설명과 참조 가능 여부, 암호화 여부도 확인할 수 있어요.
출처: 문서
본문
{
"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"
},
"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. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.",
"type": "string"
},
"compression_type": {
"default": "none",
"description": "The compression codec the producer uses to compress message batches before sending them to the Kafka broker. This applies only to the Kong-to-broker hop and is independent of any HTTP-level `Content-Encoding`. Defaults to `none` (compression disabled); `lz4` is the recommended codec when enabling compression.",
"enum": [
"gzip",
"lz4",
"none",
"snappy"
],
"type": "string"
},
"custom_fields_by_lua": {
"additionalProperties": {
"type": "string"
},
"description": "Lua code as a key-value map",
"type": "object"
},
"keepalive": {
"default": 60000,
"type": "integer"
},
"keepalive_enabled": {
"default": false,
"type": "boolean"
},
"key_query_arg": {
"description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.",
"type": "string"
},
"new_kafka_async_producer": {
"default": false,
"description": "Use the improved asynchronous Kafka producer, which batches messages more efficiently under high load. Only affects asynchronous mode. Messages without a key may be reordered across partitions; set a message key if ordering matters.",
"type": "boolean"
},
"producer_async": {
"default": true,
"description": "Flag to enable asynchronous mode.",
"type": "boolean"
},
"producer_async_buffering_limits_messages_in_memory": {
"default": 50000,
"description": "Maximum number of messages that can be buffered in memory in asynchronous mode.",
"type": "integer"
},
"producer_async_flush_timeout": {
"default": 1000,
"description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.",
"type": "integer"
},
"producer_request_acks": {
"default": 1,
"description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).",
"enum": [
-1,
0,
1
],
"type": "integer"
},
"producer_request_limits_bytes_per_request": {
"default": 1048576,
"description": "Maximum size of a Produce request in bytes.",
"type": "integer"
},
"producer_request_limits_messages_per_request": {
"default": 200,
"description": "Maximum number of messages to include into a single Produce request.",
"type": "integer"
},
"producer_request_retries_backoff_timeout": {
"default": 100,
"description": "Backoff interval between retry attempts in milliseconds.",
"type": "integer"
},
"producer_request_retries_max_attempts": {
"default": 10,
"description": "Maximum number of retry attempts per single Produce request.",
"type": "integer"
},
"producer_request_timeout": {
"default": 2000,
"description": "Time to wait for a Produce response in milliseconds",
"type": "integer"
},
"schema_registry": {
"description": "The plugin-global schema registry configuration. This can be overwritten by the topic 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"
},
"key_schema": {
"properties": {
"payload_encoding": {
"default": "avro_json",
"description": "How the client encodes union/nullable fields in the request body for Avro schemas. 'avro_json' (default) requires Avro-spec JSON with type-tagged unions (e.g. {\"int\": 1}, {\"null\": null}). 'simple_json' lets the gateway accept plain JSON and resolve union branches against the schema.",
"enum": [
"avro_json",
"simple_json"
],
"type": "string"
},
"schema_version": {
"description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.",
"type": "string"
},
"subject_name": {
"description": "The name of the subject",
"type": "string"
}
},
"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"
},
"value_schema": {
"properties": {
"payload_encoding": {
"default": "avro_json",
"description": "How the client encodes union/nullable fields in the request body for Avro schemas. 'avro_json' (default) requires Avro-spec JSON with type-tagged unions (e.g. {\"int\": 1}, {\"null\": null}). 'simple_json' lets the gateway accept plain JSON and resolve union branches against the schema.",
"enum": [
"avro_json",
"simple_json"
],
"type": "string"
},
"schema_version": {
"description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.",
"type": "string"
},
"subject_name": {
"description": "The name of the subject",
"type": "string"
}
},
"type": "object"
}
},
"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"
},
"timeout": {
"default": 10000,
"description": "Socket timeout in milliseconds.",
"type": "integer"
},
"topic": {
"description": "The Kafka topic to publish to.",
"type": "string"
}
},
"required": [
"topic"
],
"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"
},
"service": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"config"
]
}
더 알아보기 (Learn more)
- 볼트에서 비밀을 참조하는 방법 — referenceable
- 키링을 통한 암호화 방법 — encrypted