Force auth when fetching Kafka metadata
Kafka metadata may also require authentication. This PR forces authentication before fetching Kafka metadata.
@fede1024, @benesch, @davidblewett Can some one have a look into this small change?
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
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.