Skip to content

Conversation

@fresh-borzoni
Copy link
Contributor

@fresh-borzoni fresh-borzoni commented Dec 8, 2025

Add SASL/OAUTHBEARER authentication support (KIP-255)

Adds OAUTHBEARER mechanism for OAuth 2.0 token-based authentication with Kafka 2.0+.

Usage:

KafkaEx.Auth.Config.new(%{
  mechanism: :oauthbearer,
  mechanism_opts: %{
    token_provider: fn -> {:ok, jwt_token} end,
    extensions: %{"traceId" => "optional"}  # KIP-342
  }
})

Changes:

lib/kafka_ex/auth/sasl/oauthbearer.ex - new mechanism module
lib/kafka_ex/auth/sasl.ex - register mechanism
Tests and docs

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.

1 participant