Skip to content

Conversation

chahatsagarmain
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

How was this change tested?

Checklist

Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.44%. Comparing base (4a14e87) to head (f995ab7).
Report is 3 commits behind head on main.

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     
Flag Coverage Δ
badger_v1 8.31% <0.00%> (+<0.01%) ⬆️
badger_v2 1.67% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v1 14.39% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v2 1.61% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v1 14.39% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v2 1.61% <0.00%> (+<0.01%) ⬆️
elasticsearch-6.x-v1 18.60% <0.00%> (+<0.01%) ⬆️
elasticsearch-7.x-v1 18.69% <0.00%> (+0.01%) ⬆️
elasticsearch-8.x-v1 18.86% <0.00%> (+<0.01%) ⬆️
elasticsearch-8.x-v2 1.67% <0.00%> (+0.01%) ⬆️
grpc_v1 9.45% <0.00%> (+<0.01%) ⬆️
grpc_v2 6.99% <0.00%> (+<0.01%) ⬆️
kafka-v1 8.87% <12.50%> (-0.01%) ⬇️
kafka-v2 1.67% <0.00%> (+<0.01%) ⬆️
memory_v2 1.67% <0.00%> (+0.01%) ⬆️
opensearch-1.x-v1 18.74% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v1 18.73% <0.00%> (-0.01%) ⬇️
opensearch-2.x-v2 1.66% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.46% <0.00%> (+<0.01%) ⬆️
unittests 95.35% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
@yurishkuro yurishkuro merged commit 1a09227 into jaegertracing:main Nov 28, 2024
52 of 53 checks passed
@chahatsagarmain chahatsagarmain deleted the kafka-tls branch November 28, 2024 18:44
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants