Skip to content

Conversation

@ycombinator
Copy link
Contributor

Description

When #13926 is merged, all unit tests in this repository will be run with GODEBUG=fips140=only to help surface any FIPS-140 violations in all the Go modules in this repository.

One such unit test that fails in these circumstances is config/configtls.TestTPM_loadCertificate. However, the FIPS violation surfaced by this test is from the test code itself (as opposed to from OpenTelemetry Collector core code that the test is exercising), specifically when this call is made:

tpmKey, err := keyfile.NewLoadableKey(tpm, tpm2.TPMAlgECC, 256, []byte(""))

As such, this is not a FIPS violation we need to worry about when running the OpenTelemetry Collector. To prevent the unit test from failing when it's run with GODEBUG=fips140=only, we skip it.

Link to tracking issue

Fixes #13989

Testing

Run the configtls.TestTPM_loadCertificate unit test with GODEBUG=fips140=only. Make sure OS is Linux and Go version is >= 1.24.6.

$ cd config/configtls/
$ GODEBUG=fips140=only go test ./... -test.run TestTPM_loadCertificate

@ycombinator ycombinator requested a review from a team as a code owner November 26, 2025 19:22
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 26, 2025

CodSpeed Performance Report

Merging #14225 will not alter performance

Comparing ycombinator:fips-skip-cfb (e283e54) with main (974da01)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 71 untouched

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.11%. Comparing base (974da01) to head (e283e54).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14225      +/-   ##
==========================================
- Coverage   92.15%   92.11%   -0.04%     
==========================================
  Files         667      667              
  Lines       41446    41446              
==========================================
- Hits        38194    38179      -15     
- Misses       2215     2225      +10     
- Partials     1037     1042       +5     

☔ View full report in Codecov by Sentry.
📢 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.

@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Nov 27, 2025
@bogdandrutu bogdandrutu added this pull request to the merge queue Nov 27, 2025
Merged via the queue into open-telemetry:main with commit a9f386e Nov 27, 2025
80 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fips140] config/configtls.TestTPM_loadCertificate unit test fails with GODEBUG=fips140=only

3 participants