From 684b14c8a796de7e53fbce91ca18a577a3d199a5 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 20 Apr 2023 14:48:15 -0700 Subject: [PATCH] enable sasl for kafka --- Cargo.lock | 45 +++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 1 + web3_proxy/Cargo.toml | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index ae05a0fb..354b1f40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1452,6 +1452,18 @@ version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +[[package]] +name = "duct" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ae3fc31835f74c2a7ceda3aeede378b0ae2e74c8f1c36559fcc9ae2a4e7d3e" +dependencies = [ + "libc", + "once_cell", + "os_pipe", + "shared_child", +] + [[package]] name = "dunce" version = "1.0.3" @@ -3594,6 +3606,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "os_pipe" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53dbb20faf34b16087a931834cba2d7a73cc74af2b7ef345a4c8324e2409a12" +dependencies = [ + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "os_str_bytes" version = "6.4.1" @@ -4307,6 +4329,7 @@ dependencies = [ "num_enum 0.5.11", "openssl-sys", "pkg-config", + "sasl2-sys", "zstd-sys", ] @@ -4711,6 +4734,18 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sasl2-sys" +version = "0.1.20+2.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e645bd98535fc8fd251c43ba7c7c1f9be1e0369c99b6a5ea719052a773e655c" +dependencies = [ + "cc", + "duct", + "libc", + "pkg-config", +] + [[package]] name = "scale-info" version = "2.3.1" @@ -5289,6 +5324,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared_child" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "signal-hook" version = "0.3.15" diff --git a/Dockerfile b/Dockerfile index e1bbb8e2..a09e71ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ RUN apt-get update && \ cmake \ liblz4-dev \ libpthread-stubs0-dev \ + libsasl2-dev \ libssl-dev \ libzstd-dev \ make \ diff --git a/web3_proxy/Cargo.toml b/web3_proxy/Cargo.toml index 1136ad26..dbcc230e 100644 --- a/web3_proxy/Cargo.toml +++ b/web3_proxy/Cargo.toml @@ -10,7 +10,7 @@ default-run = "web3_proxy_cli" default = ["deadlock_detection"] deadlock_detection = ["parking_lot/deadlock_detection"] tokio-console = ["dep:tokio-console", "dep:console-subscriber"] -rdkafka-src = ["rdkafka/cmake-build", "rdkafka/libz", "rdkafka/ssl", "rdkafka/zstd-pkg-config"] +rdkafka-src = ["rdkafka/cmake-build", "rdkafka/gssapi", "rdkafka/libz", "rdkafka/ssl", "rdkafka/zstd-pkg-config"] [dependencies] deferred-rate-limiter = { path = "../deferred-rate-limiter" }