Skip to content

Fix bug with missing TLS consistency match - #191

Open
hellais wants to merge 1 commit into
mainfrom
fix/tls_consistency
Open

hellais wants to merge 1 commit into
mainfrom
fix/tls_consistency

Conversation

@hellais

@hellais hellais commented Sep 28, 2026

Copy link
Copy Markdown
Member

The analysis query checks for DNS consistency using hasAny(union_tls_consistent_ips, dns_answers), however the ctrl join was not correctly mapping the TLS consistency checks to the DNS answers.

The root cause is that the observation generation is not performing the correct mapping, since DNS rows are mapped only by IP as the transaction_id in DNS is a fresh one, leading to it greedily picking based on IP instead of tls_server_name. This means that in the event of a redirect (eg. to www.) where the IPs are the same it will be mapped to the wrong fqdn.

For the moment as a workaround to the analysis when the hostname field is empty, because it wasn't able to be JOINed correctly, we will default to the tls_server_name.

This is a new problem that came to surface with web_connectivity 0.5 that performs additional TLS handshakes for the full redirect chain, hence we had not seen it before.

related to: #180

The analysis query checks for DNS consistency using
hasAny(union_tls_consistent_ips, dns_answers), however the ctrl join was
not correctly mapping the TLS consistency checks to the DNS answers.

The root cause is that the observation generation is not performing the
correct mapping, since DNS rows are mapped only by IP as the
transaction_id in DNS is a fresh one, leading to it greedily picking
based on IP instead of tls_server_name. This means that in the event of
a redirect (eg. to www.) where the IPs are the same it will be mapped to
the wrong fqdn.

For the moment as a workaround to the analysis when the hostname field
is empty, because it wasn't able to be JOINed correctly, we will default
to the tls_server_name.

This is a new problem that came to surface with web_connectivity 0.5
that performs additional TLS handshakes for the full redirect chain,
hence we had not seen it before.
@hellais
hellais requested a review from DecFox September 28, 2026 14:24
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.13%. Comparing base (07e13bd) to head (1bab1b4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   83.07%   83.13%   +0.05%     
==========================================
  Files          91       91              
  Lines        6411     6415       +4     
==========================================
+ Hits         5326     5333       +7     
+ Misses       1085     1082       -3     
Flag Coverage Δ
oonidata 77.87% <ø> (ø)
oonipipeline 85.41% <ø> (+0.08%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DecFox DecFox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants