Skip to content

Conversation

@tillrohrmann
Copy link
Contributor

@tillrohrmann tillrohrmann commented Nov 10, 2025

To use the Kafka ingress with OIDC authentication, we need to enable the gssapi-vendored
and curl-static features on our rdkafka dependency. To make things properly work with cross
compilation, we need to patch rust-sasl and rdkafka and bump librdkafka to v2.12.1. The latter
allows us to compile with curl-static which saves us the hassle to dynamically link against
libraries from a different target architecture.

@tillrohrmann tillrohrmann force-pushed the kafka-oidc branch 3 times, most recently from 4a5adcc to 65c275e Compare November 11, 2025 22:50
@tillrohrmann tillrohrmann force-pushed the kafka-oidc branch 2 times, most recently from cfe2cb0 to cda039b Compare November 12, 2025 09:12

# todo only enable those env variables when cross compiling
# Set krb5 cross-compilation env variables (because we cannot run cross compiled tests)
ENV krb5_cv_attr_constructor_destructor=yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we just set these in the build.rs of libsasl or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to upstream them. Until this is done, I would keep them here to avoid introducing yet another fork.

[features]
default = ["no-trace-logging"]
# let's see whether kafka-oidc works on all targets, if not, then remove from default features
default = ["no-trace-logging", "kafka-oidc"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work on musl?

Copy link
Contributor Author

@tillrohrmann tillrohrmann Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First it didn't work. With a few patches to the build script of rdkafka the musl build seems to work. We are relying on https://github.com/restatedev/rust-rdkafka/tree/fix-build-script for this to work.

@tillrohrmann tillrohrmann force-pushed the kafka-oidc branch 3 times, most recently from 6f46511 to 333c8da Compare November 13, 2025 15:24
…ver builds

To use the Kafka ingress with OIDC authentication, we need to enable the gssapi-vendored
and curl-static features on our rdkafka dependency. To make things properly work with cross
compilation, we need to patch rust-sasl and rdkafka and bump librdkafka to v2.12.1. The latter
allows us to compile with curl-static which saves us the hassle to dynamically link against
libraries from a different target architecture.

Update transitive dependencies to work with cross compilation

Bump rdkafka to use librdkafka 2.12.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants