What is SaslHandshake?
Negotiates the SASL authentication mechanism immediately after TCP connection, before any data flows. If the client requests a mechanism the broker doesn't support (e.g., SCRAM-SHA-512 when only PLAIN is configured), the broker responds with the supported list and closes the connection.
Wire Diagram
Request Header
message_size
int32 · 4B
api_key
int16 · 2B
api_version
int16 · 2B
correlation_id
int32 · 4B
client_id
string
SaslHandshakeRequest v0
Mechanism
string
Schema & Example
Schema { "Mechanism": string }
Example { "Mechanism": "SCRAM-SHA-256" }