Skip to content

Conversation

@mk8
Copy link

@mk8 mk8 commented Mar 11, 2025

I'm not able to connect to Kafka server when the BOOTSTRAP_BROKER is a FQDN with a dot at the end.
Different Kafka implementation provide endpoints with a dot at the end so you can use a BOOTSTRAP_BROKER without dot at the end but you ad not able to connect to the topic anyway.

@mk8 mk8 requested a review from a team as a code owner March 11, 2025 15:17
@confluent-cla-assistant
Copy link

confluent-cla-assistant bot commented Mar 11, 2025

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ mk8
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Co-authored-by: Joe Julian <me@joejulian.name>
@david-yu
Copy link

Hi team based on the discussion in openssl/openssl#11560 (comment) would it be reasonable to accept the change in behavior for ignoring the trailing . in the FQDN? Also see this here: #4348. Although folks have worked around this already it does seem like the proper behavior to follow.

@mk8 mk8 requested a review from joejulian March 28, 2025 11:18
@david-yu
Copy link

@emasab Any chance we could get your take on this PR? This seems like valid behavior to have and check for in the client and doesn't sound like would break existing behavior.

@mk8 mk8 closed this May 28, 2025
Comment on lines 585 to 587
char* dot = strrchr(rktrans->rktrans_rkb->rkb_nodename, '.');
if (dot != NULL && dot[1] == ':')
memmove(dot, &dot[1], strlen(&dot[1]) + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't modify the rkb_nodename but the change should be done in rd_kafka_transport_ssl_set_endpoint_id after copying the string as the name can be resolved again on rd_kafka_broker_connect

@emasab
Copy link
Contributor

emasab commented May 30, 2025

@david-yu yes the change seems valid following RFC 6066 but only when using it as SNI, rkb_nodename shouldn't be changed in other places.

@mk8
Copy link
Author

mk8 commented May 30, 2025 via email

@mk8
Copy link
Author

mk8 commented May 30, 2025 via email

@david-yu
Copy link

@emasab The updates can now be found in this new PR: #5095 thank you for your review. Could you review that PR instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants