You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove cyrus-sasl runtime dependency by dropping gssapi feature
The gssapi feature on rdkafka pulled in cyrus-sasl as a dynamic library
dependency, causing dyld errors on macOS when cyrus-sasl wasn't installed
via Homebrew. Since gssapi is only needed for Kerberos authentication,
and SASL/SCRAM and SASL/PLAIN are built into librdkafka natively, this
removes it from the default build. Kerberos users can opt in by building
from source with the gssapi feature re-enabled — documented in
docs/configuration.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
> **Kerberos support:** If you need Kerberos (GSSAPI) authentication, add `"gssapi"` to the rdkafka features in `Cargo.toml` and install `cyrus-sasl` (`brew install cyrus-sasl` on macOS, `libsasl2-dev` on Debian/Ubuntu). See [Building with Kerberos Support](docs/configuration.md#building-with-kerberos-support) for details.
> **Kerberos (GSSAPI):** Kerberos authentication is not included in the default build. To enable it, you must build k2i from source with the `gssapi` feature. See [Building with Kerberos Support](#building-with-kerberos-support) below.
139
+
138
140
---
139
141
140
142
## Iceberg Configuration
@@ -521,3 +523,58 @@ health_port = 8080
521
523
log_level = "debug"
522
524
log_format = "text"
523
525
```
526
+
527
+
---
528
+
529
+
## Building with Kerberos Support
530
+
531
+
The default k2i binary supports SASL mechanisms `PLAIN`, `SCRAM-SHA-256`, and `SCRAM-SHA-512`. If your Kafka cluster requires **Kerberos (GSSAPI)** authentication, you need to build from source with the `gssapi` feature enabled.
532
+
533
+
### Prerequisites
534
+
535
+
Install the SASL development libraries:
536
+
537
+
**macOS:**
538
+
```bash
539
+
brew install cyrus-sasl
540
+
```
541
+
542
+
**Debian/Ubuntu:**
543
+
```bash
544
+
sudo apt-get install libsasl2-dev
545
+
```
546
+
547
+
**RHEL/Fedora:**
548
+
```bash
549
+
sudo dnf install cyrus-sasl-devel
550
+
```
551
+
552
+
### Build
553
+
554
+
Override the rdkafka features when building:
555
+
556
+
```bash
557
+
git clone https://github.com/osodevops/k2i.git
558
+
cd k2i
559
+
560
+
# Edit Cargo.toml to add "gssapi" to the rdkafka features:
561
+
# rdkafka = { version = "0.38", features = ["cmake-build", "ssl", "gssapi"] }
562
+
563
+
cargo build --release -p k2i-cli
564
+
```
565
+
566
+
### Docker
567
+
568
+
To build a Docker image with Kerberos support, add `libsasl2-dev` to the builder stage and `libsasl2-2` to the runtime stage in the Dockerfile, and add `"gssapi"` to the rdkafka features in `Cargo.toml` before building.
569
+
570
+
### Configuration
571
+
572
+
Once built with Kerberos support, configure GSSAPI authentication:
573
+
574
+
```toml
575
+
[kafka.security]
576
+
protocol = "SASL_SSL"
577
+
sasl_mechanism = "GSSAPI"
578
+
```
579
+
580
+
Ensure your Kerberos keytab and `krb5.conf` are properly configured on the host.
0 commit comments