본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Kafka Log 정책 구성 참조

원문 보기 위키 갱신

Kafka Log 정책 구성 참조 (Kafka Log Policy Configuration Reference)

이 문서는 AI 게이트웨이에서 Kafka로 로그를 전송할 때 사용하는 Kafka Log 정책의 구성 옵션을 참조 형식으로 정리한 문서예요. SASL 인증 설정과 Confluent 스키마 레지스트리 연동 같은 주요 파라미터를 JSON 스키마 형태로 확인할 수 있어요. 각 필드의 타입, 기본값, 제약 조건을 한눈에 파악하고 싶을 때 유용해요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "authentication": {
          "type": "object",
          "properties": {
            "user": {
              "type": "string",
              "description": "Username for SASL authentication.",
              "x-referenceable": true,
              "x-encrypted": true
            },
            "password": {
              "type": "string",
              "description": "Password for SASL authentication.",
              "x-referenceable": true,
              "x-encrypted": true
            },
            "strategy": {
              "type": "string",
              "enum": [
                "sasl"
              ],
              "description": "The authentication strategy for the policy, the only option for the value is `sasl`."
            },
            "mechanism": {
              "type": "string",
              "enum": [
                "PLAIN",
                "SCRAM-SHA-256",
                "SCRAM-SHA-512"
              ],
              "description": "The SASL authentication mechanism.  Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`."
            },
            "tokenauth": {
              "type": "boolean",
              "description": "Enable this to indicate `DelegationToken` authentication"
            }
          }
        },
        "schema_registry": {
          "type": "object",
          "properties": {
            "confluent": {
              "type": "object",
              "properties": {
                "key_schema": {
                  "type": "object",
                  "properties": {
                    "subject_name": {
                      "type": "string",
                      "description": "The name of the subject"
                    },
                    "schema_version": {
                      "type": "string",
                      "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version."
                    }
                  }
                },
                "url": {
                  "type": "string",
                  "description": "The URL of the schema registry."
                },
                "ttl": {
                  "type": "number",
                  "maximum": 3600,
                  "minimum": 0,
                  "description": "The TTL in seconds for the schema registry cache."
                },
                "ssl_verify": {
                  "type": "boolean",
                  "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.",
                  "default": true
                },
                "authentication": {
                  "type": "object",
                  "properties": {
                    "basic": {
                      "type": "object",
                      "properties": {
                        "password": {
                          "type": "string",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "username": {
                          "type": "string",
                          "x-referenceable": true,
                          "x-encrypted": true
                        }
                      },
                      "required": [
                        "password",
                        "username"
                      ]
                    },
                    "oauth2": {
                      "type": "object",
                      "properties": {
                        "password": {
                          "type": "string",
                          "description": "The password to use if `config.oauth.grant_type` is set to `password`.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of scopes to request from the IdP when obtaining a new token.",
                          "default": [
                            "openid"
                          ]
                        },
                        "token_headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "x-referenceable": true
                          },
                          "description": "Extra headers to be passed in the token endpoint request."
                        },
                        "grant_type": {
                          "type": "string",
                          "enum": [
                            "client_credentials",
                            "password"
                          ],
                          "description": "The OAuth grant type to be used.",
                          "default": "client_credentials"
                        },
                        "client_id": {
                          "type": "string",
                          "description": "The client ID for the application registration in the IdP.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "client_secret": {
                          "type": "string",
                          "description": "The client secret for the application registration in the IdP.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "audience": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of audiences passed to the IdP when obtaining a new token.",
                          "default": []
                        },
                        "token_endpoint": {
                          "type": "string",
                          "description": "The token endpoint URI."
                        },
                        "token_post_args": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "x-referenceable": true
                          },
                          "description": "Extra post arguments to be passed in the token endpoint request."
                        },
                        "username": {
                          "type": "string",
                          "description": "The username to use if `config.oauth.grant_type` is set to `password`.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        }
                      },
                      "required": [
                        "token_endpoint"
                      ]
                    },
                    "oauth2_client": {
                      "type": "object",
                      "properties": {
                        "auth_method": {
                          "type": "string",
                          "enum": [
                            "client_secret_basic",
                            "client_secret_jwt",
                            "client_secret_post",
                            "none"
                          ],
                          "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.",
                          "default": "client_secret_post"
                        },
                        "http_version": {
                          "type": "number",
                          "description": "The HTTP version used for requests made by this policy. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.",
                          "default": 1.1
                        },
                        "https_proxy_authorization": {
                          "type": "string",
                          "description": "The `Proxy-Authorization` header value to be used with `https_proxy`."
                        },
                        "no_proxy": {
                          "type": "string",
                          "description": "A comma-separated list of hosts that should not be proxied."
                        },
                        "keep_alive": {
                          "type": "boolean",
                          "description": "Whether to use keepalive connections to the IdP.",
                          "default": true
                        },
                        "ssl_verify": {
                          "type": "boolean",
                          "description": "Whether to verify the certificate presented by the IdP when using HTTPS.",
                          "default": true
                        },
                        "client_secret_jwt_alg": {
                          "type": "string",
                          "enum": [
                            "HS256",
                            "HS512"
                          ],
                          "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.",
                          "default": "HS512"
                        },
                        "http_proxy": {
                          "type": "string",
                          "description": "The proxy to use when making HTTP requests to the IdP."
                        },
                        "http_proxy_authorization": {
                          "type": "string",
                          "description": "The `Proxy-Authorization` header value to be used with `http_proxy`."
                        },
                        "https_proxy": {
                          "type": "string",
                          "description": "The proxy to use when making HTTPS requests to the IdP."
                        },
                        "timeout": {
                          "type": "integer",
                          "maximum": 2147483646,
                          "minimum": 0,
                          "description": "Network I/O timeout for requests to the IdP in milliseconds.",
                          "default": 10000
                        }
                      }
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "none",
                        "oauth2"
                      ],
                      "description": "Authentication mode to use with the schema registry.",
                      "default": "none"
                    }
                  }
                },
                "value_schema": {
                  "type": "object",
                  "properties": {
                    "subject_name": {
                      "type": "string",
                      "description": "The name of the subject"
                    },
                    "schema_version": {
                      "type": "string",
                      "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version."
                    }
                  }
                }
              }
            }
          },
          "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration."
        },
        "producer_request_limits_bytes_per_request": {
          "type": "integer",
          "description": "Maximum size of a Produce request in bytes.",
          "default": 1048576
        },
        "producer_async_flush_timeout": {
          "type": "integer",
          "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.",
          "default": 1000
        },
        "timeout": {
          "type": "integer",
          "description": "Socket timeout in milliseconds.",
          "default": 10000
        },
        "cluster_name": {
          "type": "string",
          "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 policy is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these policies will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster."
        },
        "producer_request_limits_messages_per_request": {
          "type": "integer",
          "description": "Maximum number of messages to include into a single Produce request.",
          "default": 200
        },
        "producer_request_retries_max_attempts": {
          "type": "integer",
          "description": "Maximum number of retry attempts per single Produce request.",
          "default": 10
        },
        "producer_request_retries_backoff_timeout": {
          "type": "integer",
          "description": "Backoff interval between retry attempts in milliseconds.",
          "default": 100
        },
        "custom_fields_by_lua": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Lua code as a key-value map"
        },
        "keepalive_enabled": {
          "type": "boolean",
          "default": false
        },
        "producer_request_acks": {
          "type": "integer",
          "enum": [
            -1,
            0,
            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).",
          "default": 1
        },
        "producer_request_timeout": {
          "type": "integer",
          "description": "Time to wait for a Produce response in milliseconds",
          "default": 2000
        },
        "producer_async": {
          "type": "boolean",
          "description": "Flag to enable asynchronous mode.",
          "default": true
        },
        "bootstrap_servers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string",
                "description": "A string representing a host name, such as example.com."
              },
              "port": {
                "type": "integer",
                "maximum": 65535,
                "minimum": 0,
                "description": "An integer representing a port number between 0 and 65535, inclusive."
              }
            },
            "required": [
              "host",
              "port"
            ]
          },
          "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format."
        },
        "key_query_arg": {
          "type": "string",
          "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."
        },
        "security": {
          "type": "object",
          "properties": {
            "certificate_id": {
              "type": "string",
              "description": "UUID of certificate entity for mTLS authentication."
            },
            "ssl": {
              "type": "boolean",
              "description": "Enables TLS."
            },
            "ssl_verify": {
              "type": "boolean",
              "description": "When using TLS, this option enables verification of the certificate presented by the server.",
              "default": true
            }
          }
        },
        "producer_async_buffering_limits_messages_in_memory": {
          "type": "integer",
          "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.",
          "default": 50000
        },
        "topic": {
          "type": "string",
          "description": "The Kafka topic to publish to."
        },
        "keepalive": {
          "type": "integer",
          "default": 60000
        }
      },
      "required": [
        "topic"
      ]
    }
  }
}

관련 자료

더 알아보기 (Learn more)

  • 정책이 어떤 엔티티 구조로 정의되는지 이해하는 데 도움이 돼요 — AI Policy entity
  • Kafka에서 메시지를 소비하는 반대 방향 정책의 구성도 함께 살펴봐요 — Kafka Consume Policy
  • HTTP 엔드포인트로 로그를 전송하는 유사한 로그 정책과 비교해 보세요 — HTTP Log Policy