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 <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
@codecov
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 <[email protected]>
@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 <[email protected]>
Signed-off-by: amol-verma-allen <[email protected]>
Signed-off-by: Amol Verma <[email protected]>
Signed-off-by: AnmolxSingh <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mend Renovate <[email protected]>
Signed-off-by: Amol Verma <[email protected]>
Signed-off-by: w-h-a <[email protected]>
Signed-off-by: zzzk1 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: SatyamAgrawal <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: cs-308-2023 <[email protected]>
Signed-off-by: jinjia <[email protected]>
Signed-off-by: Mohammed Shuraih Shaikh <[email protected]>
Signed-off-by: sAchin-680 <[email protected]>
Signed-off-by: danish9039 <[email protected]>
Signed-off-by: hippie-danish <[email protected]>
Signed-off-by: Oyefule <[email protected]>
Signed-off-by: Andreas Gerstmayr <[email protected]>
Signed-off-by: pipiland <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: anmol7344 <[email protected]>
Signed-off-by: Anmol <[email protected]>
Signed-off-by: pipiland <[email protected]>
Signed-off-by: Anurag Singh Rajawat <[email protected]>
Signed-off-by: albertteoh <[email protected]>
Signed-off-by: Batuhan Apaydin <[email protected]>
Signed-off-by: Damian Maslanka <[email protected]>
Signed-off-by: Shubham Solanki <[email protected]>
Signed-off-by: Denys Vitali <[email protected]>
Signed-off-by: Timon Engelke <[email protected]>
Signed-off-by: zhengkezhou1 <[email protected]>
Signed-off-by: Amol Verma ( Dingus ) <[email protected]>
Signed-off-by: Parship Chowdhury <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Co-authored-by: Amol Verma <[email protected]>
Co-authored-by: Anmol <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mahad Zaryab <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Wes Anderson <[email protected]>
Co-authored-by: Zhengke Zhou <[email protected]>
Co-authored-by: Mahad Zaryab <[email protected]>
Co-authored-by: Manik Mehta <[email protected]>
Co-authored-by: amol-verma-allen <[email protected]>
Co-authored-by: SatyamAgrawal <[email protected]>
Co-authored-by: Aditya Ruhela <[email protected]>
Co-authored-by: jinjia <[email protected]>
Co-authored-by: shuraih775 <[email protected]>
Co-authored-by: SACHIN KUMAR <[email protected]>
Co-authored-by: hippie-danish <[email protected]>
Co-authored-by: Oyefule Oluwatayo <[email protected]>
Co-authored-by: Andreas Gerstmayr <[email protected]>
Co-authored-by: pipiland <[email protected]>
Co-authored-by: Anurag Rajawat <[email protected]>
Co-authored-by: Albert <[email protected]>
Co-authored-by: Batuhan Apaydın <[email protected]>
Co-authored-by: Damian Maślanka <[email protected]>
Co-authored-by: Shubham Solanki <[email protected]>
Co-authored-by: Denys Vitali <[email protected]>
Co-authored-by: Timon Engelke <[email protected]>
Co-authored-by: Amol Verma ( Dingus ) <[email protected]>
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