confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
268 stars 3.15k forks source link

Using ssl.certificate.pem does not send the full ca-chain #3225

Open sunnybenari opened 3 years ago

sunnybenari commented 3 years ago

Description

When using ssl.certificate.pem configuration the client doesn't send the full chain. Note: ssl.certificate.location sends the full chain

How to reproduce

Run producer/consumer where ssl.ca.location has only the Root CA and set ssl.certificate.pem with the full chain.

Logs:

From .NET client (proxy from librdkafka)

Confluent.Kafka.ProduceException`2[System.String,System.String]: Broker: Topic authorization failed
   at Confluent.Kafka.Producer`2.Produce(TopicPartition topicPartition, Message`2 message, Action`1 deliveryHandler)
   at Confluent.Kafka.Producer`2.Produce(String topic, Message`2 message, Action`1 deliveryHandler)

Checklist

Please provide the following information:

cactus620 commented 8 months ago

We met the same issue here. We're using the library of version 2.1.1. And our ssl.certificate.pem content is in the format like below:

-----BEGIN CERTIFICATE-----
(Base64-encoded certificate data for the client certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Base64-encoded certificate data for the intermediate CA)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Base64-encoded certificate data for the root CA)
-----END CERTIFICATE-----

We've tried to capture the packages sent using Wireshark. Only the first block of the client certificate was sent. The intermediate CA and root CA were not sent. Please kindly help to review the issue.

trnguyencflt commented 4 months ago

Encounter the same issue when using ssl.keystore.location, only the leaf certificate is sent to server.

abhijeet2096-confluent commented 2 months ago

Hiting this issue in confluent-operator