Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From [kafka 2.0](https://kafka.apache.org/20/documentation.html#security_confighostname) onwards, host name verification of servers is enabled by default. This means that the "fake" certificate we generate and use for kafka-auth is no longer valid and missing the `DNSNames` field. Since then, the verification had been failing. But this error message was never surfaced back to us until sarama upgrade happened. This patch fixes the failure by adding the missing fields in the certificate. Test history 1. Kafka-auth was working as expected. In this test, we generate and pass "fake" certificates for inter-broker communication within the Kafka cluster. 2. Some changes were made in the java environment or kafka cluster (https://kafka.apache.org/20/documentation.html#security_confighostname), resulting in hostname verification which wasn't previously enforced. This means that the "fake" certificate we generated before is no longer valid and missing the `DNSNames` field. Since then, we’ve always been getting an error message in our kafka server logs. But this error was never surfaced up in sarama code during Dial() AND kafka-auth only checks the success of the CREATE stmt but not emitting messages. So our test has always been passing. 3. Sarama upgrade changed how Dial() works and is now invoking some untouched kafka code and surfacing the error. Overall, this issue pertains to test misconfiguration and not directly user-facing. But the sarama upgrade may lead to similar issues for customers due to the wide possibilities of kafka configurations. In this case, we don't think a release note is necessary because customers should have encountered this error message. This issue has been around for a while and should be surfaced once the customer uses anything beyond Dial() - when they try to emit messages to kafka sink. Fixes: cockroachdb#118525 Release note: none
- Loading branch information