-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[kafka] OTEL helper instead of tlscfg package #6270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
yurishkuro
reviewed
Nov 28, 2024
yurishkuro
reviewed
Nov 28, 2024
yurishkuro
reviewed
Nov 28, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6270 +/- ##
===========================================
+ Coverage 48.78% 96.44% +47.65%
===========================================
Files 179 355 +176
Lines 10799 20152 +9353
===========================================
+ Hits 5268 19435 +14167
+ Misses 5088 528 -4560
+ Partials 443 189 -254
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
yurishkuro
reviewed
Nov 28, 2024
Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
yurishkuro
approved these changes
Nov 28, 2024
3 tasks
This was referenced Jul 23, 2025
yurishkuro
added a commit
that referenced
this pull request
Jul 31, 2025
## Which problem is this PR solving? - Resolves #6744 ## Description of the changes ### Issue: - PR #6270 introduced a regression in Kafka TLS configuration. The original code allowed TLS to be used with any authentication method (plaintext, kerberos, tls) by checking `config.Authentication == tls || config.TLS.Enabled`. However, the pr changed this to only `config.Authentication == tls`, breaking SASL_SSL configurations where users need `authentication=plaintext` with `tls.enabled=true`. - continuation of pr #6764 - fix some issues: - Fixed incorrect TLS detection logic: ``` // CORRECT - Simple OTEL-compliant logic if config.Authentication == tls || !config.TLS.Insecure { if err := setTLSConfiguration(&config.TLS, saramaConfig, logger); err != nil { return err } } ``` - Fixed security vulnerability: ``` // SECURE - Proper CA handling based on actual TLS usage if config.Authentication == tls { tlsCfg.Insecure = false tlsCfg.IncludeSystemCACertsPool = true } else if v.GetBool(configPrefix + ".tls.enabled") { tlsCfg.Insecure = false tlsCfg.IncludeSystemCACertsPool = true } ``` ``` // Always load TLS configuration from viper (cleaner approach) tlsClientConfig := tlscfg.ClientFlagsConfig{Prefix: configPrefix} tlsCfg, err := tlsClientConfig.InitFromViper(v) // Then configure based on usage ``` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Yuri Shkuro <github@ysh.us> Signed-off-by: amol-verma-allen <amol.verma@allen.in> Signed-off-by: Amol Verma <amolverma@LT-BEN-90852.local> Signed-off-by: AnmolxSingh <anmol7344@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com> Signed-off-by: Mend Renovate <bot@renovateapp.com> Signed-off-by: Amol Verma <amilbcahat@gmail.com> Signed-off-by: w-h-a <wesley.herb.anderson@gmail.com> Signed-off-by: zzzk1 <madzhou1@gmail.com> Signed-off-by: Manik2708 <mehtamanik96@gmail.com> Signed-off-by: SatyamAgrawal <95954551+Asatyam@users.noreply.github.com> Signed-off-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com> Signed-off-by: jinjia <jinjiakarl@outlook.com> Signed-off-by: Mohammed Shuraih Shaikh <shuraih15@gmail.com> Signed-off-by: sAchin-680 <mrmister680@gmail.com> Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Signed-off-by: Oyefule <drelanorgent@gmail.com> Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> Signed-off-by: pipiland <nguyen.t.dang.minh@gmail.com> Signed-off-by: Mahad Zaryab <43658574+mahadzaryab1@users.noreply.github.com> Signed-off-by: anmol7344 <anmol7344@gmail.com> Signed-off-by: Anmol <166167480+AnmolxSingh@users.noreply.github.com> Signed-off-by: pipiland <148210689+pipiland2612@users.noreply.github.com> Signed-off-by: Anurag Singh Rajawat <anuragsinghrajawat22@gmail.com> Signed-off-by: albertteoh <see.kwang.teoh@gmail.com> Signed-off-by: Batuhan Apaydin <batuhan.apaydin@chainguard.dev> Signed-off-by: Damian Maslanka <damian.maslanka5@gmail.com> Signed-off-by: Shubham Solanki <shubham24071999@gmail.com> Signed-off-by: Denys Vitali <denys@denv.it> Signed-off-by: Timon Engelke <timon.engelke@inovex.de> Signed-off-by: zhengkezhou1 <madzhou1@gmail.com> Signed-off-by: Amol Verma ( Dingus ) <68186313+amilbcahat@users.noreply.github.com> Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Co-authored-by: Amol Verma <amolverma@LT-BEN-90852.local> Co-authored-by: Anmol <166167480+AnmolxSingh@users.noreply.github.com> Co-authored-by: Yuri Shkuro <github@ysh.us> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mahad Zaryab <43658574+mahadzaryab1@users.noreply.github.com> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Wes Anderson <wesley.herb.anderson@gmail.com> Co-authored-by: Zhengke Zhou <madzhou1@gmail.com> Co-authored-by: Mahad Zaryab <mahadzaryab1@gmail.com> Co-authored-by: Manik Mehta <mehtamanik96@gmail.com> Co-authored-by: amol-verma-allen <amol.verma@allen.in> Co-authored-by: SatyamAgrawal <95954551+Asatyam@users.noreply.github.com> Co-authored-by: Aditya Ruhela <110272990+ADI-ROXX@users.noreply.github.com> Co-authored-by: jinjia <jinjiaKarl@outlook.com> Co-authored-by: shuraih775 <74284337+shuraih775@users.noreply.github.com> Co-authored-by: SACHIN KUMAR <118827645+sAchin-680@users.noreply.github.com> Co-authored-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Co-authored-by: Oyefule Oluwatayo <55517265+gentcod@users.noreply.github.com> Co-authored-by: Andreas Gerstmayr <agerstmayr@redhat.com> Co-authored-by: pipiland <148210689+pipiland2612@users.noreply.github.com> Co-authored-by: Anurag Rajawat <anuragsinghrajawat22@gmail.com> Co-authored-by: Albert <26584478+albertteoh@users.noreply.github.com> Co-authored-by: Batuhan Apaydın <developerguyn@gmail.com> Co-authored-by: Damian Maślanka <damian.maslanka5@gmail.com> Co-authored-by: Shubham Solanki <shubham24071999@gmail.com> Co-authored-by: Denys Vitali <denys@denv.it> Co-authored-by: Timon Engelke <25013222+timonegk@users.noreply.github.com> Co-authored-by: Amol Verma ( Dingus ) <68186313+amilbcahat@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test