From 55a25b2164c9422ae0e2e792a20c9d0a7188bb6b Mon Sep 17 00:00:00 2001 From: BP Cheng Date: Tue, 16 Dec 2025 14:21:20 +0800 Subject: [PATCH 1/3] cmake: kafka: fix OAuth Bearer detection on Windows Signed-off-by: BP Cheng --- cmake/kafka.cmake | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cmake/kafka.cmake b/cmake/kafka.cmake index 09e98dd9228..7492e7a7389 100644 --- a/cmake/kafka.cmake +++ b/cmake/kafka.cmake @@ -28,8 +28,19 @@ else() endif() endif() -# OAuth Bearer is built into librdkafka when SASL is available -set(FLB_SASL_OAUTHBEARER_ENABLED ${FLB_SASL_ENABLED}) +# OAuth Bearer support: +# - Windows: Built-in SASL, only needs SSL (no Cyrus SASL required) +# - Linux/macOS: Needs both SSL and Cyrus SASL +if(WIN32) + if(WITH_SSL) + set(FLB_SASL_OAUTHBEARER_ENABLED ON) + else() + set(FLB_SASL_OAUTHBEARER_ENABLED OFF) + endif() +else() + # Non-Windows platforms: require Cyrus SASL + set(FLB_SASL_OAUTHBEARER_ENABLED ${FLB_SASL_ENABLED}) +endif() # MSK IAM requires OAuth Bearer support set(FLB_KAFKA_MSK_IAM_ENABLED ${FLB_SASL_OAUTHBEARER_ENABLED}) From e32b091a22d1f1ba5b43259f841e8a0b68008427 Mon Sep 17 00:00:00 2001 From: BP Cheng Date: Mon, 22 Dec 2025 11:04:28 +0800 Subject: [PATCH 2/3] cmake: kafka: fix OAuth Bearer detection on Windows Use "FLB_TLS" AS justifaction. Signed-off-by: BP Cheng --- cmake/kafka.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/kafka.cmake b/cmake/kafka.cmake index 7492e7a7389..36dbc52519f 100644 --- a/cmake/kafka.cmake +++ b/cmake/kafka.cmake @@ -32,7 +32,7 @@ endif() # - Windows: Built-in SASL, only needs SSL (no Cyrus SASL required) # - Linux/macOS: Needs both SSL and Cyrus SASL if(WIN32) - if(WITH_SSL) + if(FLB_TLS) set(FLB_SASL_OAUTHBEARER_ENABLED ON) else() set(FLB_SASL_OAUTHBEARER_ENABLED OFF) From 846f8f419bd3d99705c1dc90ca1068f825176410 Mon Sep 17 00:00:00 2001 From: BP Cheng Date: Mon, 22 Dec 2025 11:12:17 +0800 Subject: [PATCH 3/3] cmake: kafka: Use FLB_SYSTEM_WINDOWS to detect Windows Signed-off-by: BP Cheng --- cmake/kafka.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/kafka.cmake b/cmake/kafka.cmake index 36dbc52519f..8091ca77b6c 100644 --- a/cmake/kafka.cmake +++ b/cmake/kafka.cmake @@ -31,7 +31,7 @@ endif() # OAuth Bearer support: # - Windows: Built-in SASL, only needs SSL (no Cyrus SASL required) # - Linux/macOS: Needs both SSL and Cyrus SASL -if(WIN32) +if(FLB_SYSTEM_WINDOWS) if(FLB_TLS) set(FLB_SASL_OAUTHBEARER_ENABLED ON) else()