librdkafka
librdkafka copied to clipboard
Fix checking SASLHandshake from APIVersions
librdkafka's current (SASL) authentication behavior:
-
It sends an
APIVersionsrequest and setsRD_KAFKA_FEATURE_SASL_HANDSHAKEif the supported versions ofSASLHandshakefrom server overlap with[0, 0]. -
If not set, it errors with SASL Handshake not supported by broker.
-
If set, it sends a
SASLHandshakerequest at the supported highest version in[0, 1].
In short, if the server doesn't support version 0, librdkafka errors. If the server supports version 0 and 1, librdkafka sends a request at version 1.
This PR fixes step 1 to make it allow versions [0, 1], consistent with step 3.