Repository navigation
feat(config): Support SASL/OAUTHBEARER with an OIDC token endpoint - #832
Draft
enochtangg wants to merge 1 commit into
Draft
enochtangg wants to merge 1 commit into
enochtangg wants to merge 1 commit into
Conversation
Adds sasl_oauthbearer_method, sasl_oauthbearer_token_endpoint_url, sasl_oauthbearer_client_id and sasl_oauthbearer_client_secret to kafka_clusters and passes them to librdkafka. This lets taskbroker log in to Google Managed Kafka through Google's local auth server, which hands out Workload Identity tokens, so no Kafka password is stored. librdkafka needs libcurl to fetch tokens over HTTP, so this turns on rdkafka's curl feature and adds libcurl to the image. Only the kafka_clusters format gets the new settings, not the deprecated flat kafka_* fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets taskbroker log in to Google Managed Kafka (GMK) with OAUTHBEARER, for the managed Kafka evaluation. Draft: this is here to scope the work, not to merge yet.
GMK doesn't support SCRAM. Its recommended login is OAUTHBEARER with short-lived Google tokens from Workload Identity, so no Kafka password is stored. For non-Java clients, Google provides a small local auth server that runs as a sidecar, and librdkafka fetches tokens from it on its own. taskbroker just needs to pass the settings through.
src/config/kafka.rs: four new optionalkafka_clusterssettings (sasl_oauthbearer_method,sasl_oauthbearer_token_endpoint_url,sasl_oauthbearer_client_id,sasl_oauthbearer_client_secret), passed to librdkafka with the other SASL settings.src/config/mod.rs: hides the client secret in the config log, and sets the new fields toNonefor the deprecated flatkafka_*config, which doesn't get them.Cargo.toml,Dockerfile: librdkafka needs libcurl to fetch tokens over HTTP, so this turns on rdkafka'scurlfeature and adds libcurl to the image.README.md: the new settings in thekafka_clustersexample.Tested in the streaming sandbox against GMK: taskbroker with the auth server sidecar consumed and committed 1,000/1,000 tasks. The stock image ignores these settings and times out on startup. Results: GMK Auth Test.