C# connecting to kafka kerberos Authentication

5 days ago 6
ARTICLE AD BOX

I have a c# code which tries to connect to kafka .My c# code has few config values

var config = new ProducerConfig { BootstrapServers = "broker1:9093", SecurityProtocol = SecurityProtocol.SaslSsl, SaslMechanism = SaslMechanism.Gssapi, SaslKerberosServiceName = "kafka", SaslKerberosPrincipal = "your-user@REALM", SaslKerberosKeytab = "/etc/security/keytabs/app.keytab", SaslKerberosKinitCmd = "kinit -k -t {0} {1}" };

I get an error using SaslKerberosKinitCmd saying thats not supported on windows. I tried searching all over but I couldn't find a way to use keytab file in windows with confluent. Instead all I got was saying its not supported on windows and librdkafka on Windows uses only SSPI, not MIT Kerberos ticket. I have to use only keytabs file.

The other thing is that the c# code uses some windows SSPI thing which over rides my SaslKerberosPrincipal as well.Is there a way i can still use the value I confi here ?

Is there a way to do it ? or I am missing something here ? Please help me out.

Read Entire Article