rust-rdkafka icon indicating copy to clipboard operation
rust-rdkafka copied to clipboard

Force auth when fetching Kafka metadata

Open andrei-ionescu opened this issue 1 year ago • 3 comments

Kafka metadata may also require authentication. This PR forces authentication before fetching Kafka metadata.

andrei-ionescu avatar Aug 07 '24 15:08 andrei-ionescu

@fede1024, @benesch, @davidblewett Can some one have a look into this small change?

andrei-ionescu avatar Dec 09 '24 12:12 andrei-ionescu

I'm not sure I understand this change. What happens to authentication if we fetch metadata without doing a poll first? Is there some librdkafka documentation that we can reference to? Thank you

fede1024 avatar Jun 21 '25 15:06 fede1024

In the current code when fetching metadata information the authentication does not happen which means that the call for metadata is missing auth.

In some cases the metadata endpoint may also need authentication, in other cases the endpoint may be auth-free. Our Kafka deployment has auth for all endpoints.

This forces the poll for auth even for metadata calls.

I re-tested it, checking if this is still reproducible and, indeed, it is still reproducible. On my Kafka deployment that has authentication enabled on all endpoints it is needed to first go through the token fetch process.

This step of going through token fetching process before any call to any Kafka endpoint is needed.

andrei-ionescu avatar Nov 19 '25 12:11 andrei-ionescu