No such configuration property: "sasl.kerberos.keytab"
See original GitHub issueHi, I’m new here. I’ve been trying to apply the MIT Kerberos authentication with the use of a keytab.
Below is my code (in .NET).
public static void Main() { string topicName = “test-topic”; var producerConfig = new ProducerConfig { BootstrapServers = "bootstrapServer ", SecurityProtocol = SecurityProtocolType.Sasl_Ssl, SaslMechanism = SaslMechanismType.Gssapi, SaslKerberosServiceName = “ksfka”, SaslKerberosPrincipal = “kafka@DOMAIN.COM”, SaslKerberosKeytab = @“D:\kafka.keytab”, SaslKerberosKinitCmd = @“kinit -k -t D:\kafka.keytab kafka@DOMAIN.COM” };
using (var producer = new Producer<Null, string>(producerConfig)) { Console.WriteLine($“{producer.Name} producing on {topicName}. q to exit.”); string text=“123”; while ((text = Console.ReadLine()) != “q”) { var deliveryReport = producer.ProduceAsync(topicName, new Message<Null, string> { Value = text }); deliveryReport.ContinueWith(task => { Console.WriteLine($“Partition: {task.Result.Partition}, Offset: {task.Result.Offset}, Message: {text}”); }); } } }
The following situation has occurred.
System.InvalidOperationException
HResult=0x80131509
Message=No such configuration property: “sasl.kerberos.keytab”
Source=Confluent.Kafka
StackTrace:
Confluent.Kafka.Impl.SafeConfigHandle.Set(String name, String value)
Confluent.Kafka.Producer.<>c__DisplayClass33_0.<.ctor>b__6(KeyValuePair2 kvp) System.Collections.Generic.List
1.ForEach(Action1 action) Confluent.Kafka.Producer..ctor(IEnumerable
1 config)
Confluent.Kafka.Producer2..ctor(IEnumerable
1 config, SerializerGenerator1 keySerializerGenerator, SerializerGenerator
1 valueSerializerGenerator)
Confluent.Kafka.Producer2..ctor(IEnumerable
1 config, Serializer1 keySerializer, Serializer
1 valueSerializer)
DotNetExample.Main() in D:\DoNetKafka\Program.cs:line 21
How can I solve it?
Checklist
Please provide the following information:
- Confluent.Kafka nuget version:1.0.0-beta
- Apache Kafka version: cloudera kafka 3.1.0
- Client configuration:
- Operating system:windows 10 build 1803
- Provide logs (with “debug” : “…” as necessary in configuration)
- Provide broker log excerpts
- Critical issue
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:14 (2 by maintainers)
Top GitHub Comments
Hi @mhowlett , I have the same issue ,and could you please describe more detail about how to use credentials of the logged in user on Windows? Thanks a lot.
This config property is apparently only supported on the linux/osx builds of librdkafka. On windows, I believe we only support credentials of the logged in user.