XK6 KAFKA extension query

Hi Team,
I have one doubt or maybe i am wrong but i am not understanding SASL mechanism in xk6 kafka .
It supports all these :

export enum SASL_MECHANISMS {
  NONE = "none",
  SASL_PLAIN = "sasl_plain",
  SASL_SCRAM_SHA256 = "sasl_scram_sha256",
  SASL_SCRAM_SHA512 = "sasl_scram_sha512",
  SASL_SSL = "sasl_ssl",
  SASL_AWS_IAM = "sasl_aws_iam",
}

but SASL_SSL is Security protocol
while SASL_SCRAM_SHA512 is SASL mechanism
If at places if i encounter both protocol and mechanism , which one should i consider/put in k6 code ?

Hey @Shabd,

SASL_SSL is basically SASL_PLAIN with TLS enabled and is a convenience method for choosing SASL_PLAIN. This way when the users choose SASL_SSL, but they don’t enable TLS, the extension raises an error to prevent seeing weird errors from Kafka on connect.

2 Likes

Thanks @mostafa for the clarification . I asked above question because i encountered a problem where both security protocol [ SASL_SSL] and security mechanism [SASL_SCRAM_SHA512] was mentioned in kafka properties and i was confused because i could see both under SASL_Mechanism under XK6 . So i didn’t knew what to use .