question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SSL] running producer with SSL config pointing to keystore fails

See original GitHub issue

Description

running producer with SSL config pointing to keystore fails

“_producerConfig.SslKeystoreLocation = {KEYSTORENAME}”; “_producerConfig.SslKeystorePassword = {KEYSTOREPASSWORD}”;

error msg: Error reading ssl.keystore.location PKCS#12 file: #\Test\keystore.p12: error:0D06B08E:asn1 encoding routines:asn1_d2i_read_bio:not enough data

stack trace:

at Confluent.Kafka.Impl.SafeKafkaHandle.Create(RdKafkaType type, IntPtr config, IClient owner) at Confluent.Kafka.Producer2..ctor(ProducerBuilder2 builder) at Confluent.Kafka.ProducerBuilder`2.Build()

i dug a bit and see that this safehandle uses runtime lbrdkafka.dll to create the connection. on their site i see that to setup ssl they make no mention of using keystore, instead suggest using file location ssl.key

Exposing the client key in a file poses a serious security risk and cannot be used on production environment.

is loading the keystore supported?

How to reproduce

setup a simple kafka producer that points to a valid keystore with a valid certificate in producerconfig. run the application.

Checklist

Please provide the following information:

  • A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
  • Confluent.Kafka nuget version.
  • Apache Kafka version.
  • Client configuration.
  • [ win 10/2019 serv] Operating system.
  • Provide logs (with “debug” : “…” as necessary in configuration).
  • Provide broker log excerpts.
  • [ x] Critical issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
edenhillcommented, Dec 16, 2022

The v2.0.0 release is planned for mid january, including this fix.

0reactions
Protheoncommented, Jan 16, 2023

Happy new year @edenhill. Is the v2.0.0 release on schedule for mid January? Best regards!

Read more comments on GitHub >

github_iconTop Results From Across the Web

kafka - ssl handshake failing
This setting means the certificate does not match the hostname of the machine you are using to run the consumer. That seems to...
Read more >
Kafka with SSL
I am trying to configure a brand new Kafka cluster/sandbox with SSL, but I keep getting errors. I apologize - 234029.
Read more >
Client receives 'Failed to load SSL keystore' message ...
When connecting a client to Event Streams, operations return 'Failed to load SSL keystore' errors when executing.
Read more >
Configuring Kafka SSL Using Spring Boot
In this tutorial, we'll cover the basic setup for connecting a Spring Boot client to an Apache Kafka broker using SSL authentication.
Read more >
Errors configuring SSL encrypted access for security
This error indicates that the signer certificate from the specified target host and port has not been located in the specified truststore, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found