diff --git a/.meta/_partials/fields/_kafka_options.toml.erb b/.meta/_partials/fields/_kafka_options.toml.erb index 9ab498a2aa372..6bb9f9aa164ac 100644 --- a/.meta/_partials/fields/_kafka_options.toml.erb +++ b/.meta/_partials/fields/_kafka_options.toml.erb @@ -30,24 +30,29 @@ The options and their values. Accepts `string` values. [<%= namespace %>.sasl] type = "table" category = "SASL" -description = "Options for SASL/SCRAM authentication support. Not supported in provided Vector binaries, you need build Vector with feature `sasl`." +common = false +description = "Options for SASL/SCRAM authentication support." [<%= namespace %>.sasl.children.enabled] type = "bool" -description = "Enable SASL/SCRAM authentication to the remote." +common = true +description = "Enable SASL/SCRAM authentication to the remote. (Not supported on Windows at this time.)" [<%= namespace %>.sasl.children.username] type = "string" +common = true examples = ["username"] description = "The Kafka SASL/SCRAM authentication username." [<%= namespace %>.sasl.children.password] type = "string" +common = true examples = ["password"] description = "The Kafka SASL/SCRAM authentication password." [<%= namespace %>.sasl.children.mechanism] type = "string" +common = true examples = ["SCRAM-SHA-256", "SCRAM-SHA-512"] description = "The Kafka SASL/SCRAM mechanisms." diff --git a/Cargo.lock b/Cargo.lock index e969a89cc2698..dd656dec6a59b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1872,6 +1872,16 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "krb5-src" +version = "0.2.4+1.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01c2b7c3b70ca41646dafc8fc3b6053a8a0da9301251e8da8548fb067462d81" +dependencies = [ + "duct", + "openssl-sys", +] + [[package]] name = "lazy_static" version = "0.2.11" @@ -3837,6 +3847,7 @@ checksum = "7b82548e259466e09971e8b1d1adfffba6005c83a2ca2aca5b5d00a61f6b8058" dependencies = [ "cc", "duct", + "krb5-src", "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 5bf26610d7622..f0e75d8b6ea99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -198,20 +198,21 @@ reqwest = { version = "0.10.6", features = ["json"] } [features] # Default features for *-unknown-linux-gnu and *-apple-darwin -default = ["sources", "transforms", "sinks", "vendored", "unix", "leveldb-plain", "rdkafka-plain"] +default = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-plain", "rdkafka-plain"] +default-musl = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-cmake", "rdkafka-cmake"] # Default features for *-unknown-linux-* which make use of `cmake` for dependencies -default-cmake = ["sources", "transforms", "sinks", "vendored", "unix", "leveldb-cmake", "rdkafka-cmake"] +default-cmake = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-cmake", "rdkafka-cmake"] # Default features for *-pc-windows-msvc -default-msvc = ["sources", "transforms", "sinks", "vendored", "leveldb-cmake", "rdkafka-cmake"] +# TODO: Enable SASL https://github.com/timberio/vector/pull/3081#issuecomment-659298042 +default-msvc = ["sources", "transforms", "sinks", "vendor-openssl", "vendor-libz", "leveldb-cmake", "rdkafka-cmake"] -# Enables features that work only on systems providing `cfg(unix) +# Enables features that work only on systems providing `cfg(unix)` unix = ["jemallocator"] -# Forces vendoring of OpenSSL and ZLib dependencies -vendored = ["openssl/vendored", "libz-sys/static"] -# Waiting for 1.1.25 to try this on musl again... -# https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/musl/default.nix -# https://git.musl-libc.org/cgit/musl/commit/?id=7844ecb590893f8344324837956718001402d297 -# https://git.musl-libc.org/cgit/musl/commit/?id=ea9525c8bcf6170df59364c4bcd616de1acf8703 +# These are **very** useful on Cross compilations! +vendor-all = ["vendor-sasl", "vendor-openssl", "vendor-libz"] +vendor-sasl = ["rdkafka/gssapi-vendored"] +vendor-openssl = ["openssl/vendored"] +vendor-libz = ["libz-sys/static"] sasl = ["rdkafka/gssapi"] # This feature is less portable, but doesn't require `cmake` as build dependency rdkafka-plain = ["rdkafka"] diff --git a/config/vector.spec.toml b/config/vector.spec.toml index 6f76f895917a6..b5d9059c17ee1 100644 --- a/config/vector.spec.toml +++ b/config/vector.spec.toml @@ -670,7 +670,8 @@ data_dir = "/home/user/vector/" # [sources.kafka.sasl] - # Enable SASL/SCRAM authentication to the remote. + # Enable SASL/SCRAM authentication to the remote. (Not supported on Windows at + # this time.) # # * optional # * no default @@ -7847,7 +7848,8 @@ require('custom_module') # [sinks.kafka.sasl] - # Enable SASL/SCRAM authentication to the remote. + # Enable SASL/SCRAM authentication to the remote. (Not supported on Windows at + # this time.) # # * optional # * no default diff --git a/docker-compose.yml b/docker-compose.yml index 8a52f39036a7b..53218a3d8a70d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: environment: NATIVE_BUILD: "false" TARGET: x86_64-unknown-linux-musl - FEATURES: default-cmake + FEATURES: default-musl CARGO_TERM_COLOR: always volumes: - $PWD:$PWD @@ -49,7 +49,7 @@ services: environment: NATIVE_BUILD: "false" TARGET: armv7-unknown-linux-musleabihf - FEATURES: default-cmake + FEATURES: default-musl CARGO_TERM_COLOR: always volumes: - $PWD:$PWD @@ -67,7 +67,7 @@ services: environment: NATIVE_BUILD: "false" TARGET: aarch64-unknown-linux-musl - FEATURES: default-cmake + FEATURES: default-musl CARGO_TERM_COLOR: always volumes: - $PWD:$PWD @@ -85,7 +85,7 @@ services: environment: NATIVE_BUILD: "false" TARGET: x86_64-unknown-linux-musl - FEATURES: default-cmake + FEATURES: default-musl CARGO_TERM_COLOR: always volumes: - $PWD:$PWD @@ -123,7 +123,7 @@ services: environment: NATIVE_BUILD: "false" TARGET: armv7-unknown-linux-musleabihf - FEATURES: default-cmake + FEATURES: default-musl CARGO_TERM_COLOR: always volumes: - $PWD:$PWD @@ -141,7 +141,7 @@ services: environment: NATIVE_BUILD: "false" TARGET: aarch64-unknown-linux-musl - FEATURES: default-cmake + FEATURES: default-musl CARGO_TERM_COLOR: always volumes: - $PWD:$PWD diff --git a/scripts/environment/bootstrap-ubuntu-20.04.sh b/scripts/environment/bootstrap-ubuntu-20.04.sh index e36774a697708..4c8dff0f860c9 100755 --- a/scripts/environment/bootstrap-ubuntu-20.04.sh +++ b/scripts/environment/bootstrap-ubuntu-20.04.sh @@ -22,6 +22,7 @@ apt install --yes \ gnupg-agent \ ruby-bundler \ nodejs \ + libsasl2-dev \ gnupg2 # Locales diff --git a/website/docs/reference/sinks/kafka.md b/website/docs/reference/sinks/kafka.md index 6036169372e19..0fe2b3c0b8513 100644 --- a/website/docs/reference/sinks/kafka.md +++ b/website/docs/reference/sinks/kafka.md @@ -1,5 +1,5 @@ --- -last_modified_on: "2020-07-13" +last_modified_on: "2020-07-16" delivery_guarantee: "at_least_once" component_title: "Kafka" description: "The Vector `kafka` sink streams `log` events to Apache Kafka via the Kafka protocol." @@ -536,13 +536,12 @@ Local message timeout. ### sasl -Options for SASL/SCRAM authentication support. Not supported in provided Vector -binaries, you need build Vector with feature [`sasl`](#sasl). +Options for SASL/SCRAM authentication support.