Skip to content

[fips140] exporter/otlpexporter unit tests fail with GODEBUG=fips140=only #13999

@ycombinator

Description

@ycombinator

Component(s)

No response

Describe the issue you're reporting

Running the exporter/otlpexporter unit tests with GODEBUG=fips140=only exposes any calls (direct or indirect) to non-FIPS140-compliant algorithms.

Such calls may be made by the test's code or from collector code exercised by the test. Also, the calls may be true positives or false positives (e.g. using md5, which is not FIPS140-compliant for cryptographic uses, in a non-cryptographic context, e.g. hashing for checksums). Depending on where the calls are being made from (test code or collector code) and whether they're true or false positives, we may need to either a) provide an alternative implementation — using the requirefips build tag — for the calls with ones to FIPS-compliant algorithms, b) skip the test when GODEBUG=fips140=only (should be done only if the calls are being made from the test code itself), or c) disable the code paths leading to the calls when the module is built with the requirefips build tag and document this (least preferred option).

Related to #13925 and #13926.

Steps to reproduce

  1. Make sure Go version is >= 1.24.6.
    $ go version
    go version go1.25.1 darwin/arm64
    
  2. Run the exporter/otlpexporter unit tests with GODEBUG=fips140=only.
    $ cd exporter/otlpexporter
    $ GODEBUG=fips140=only go test ./... -test.v -test.run 'TestSend.*WhenEndpointHas' -count 1
    

Observed output

=== RUN   TestSendTracesWhenEndpointHasHttpScheme
=== RUN   TestSendTracesWhenEndpointHasHttpScheme/Use_https_scheme
    otlp_test.go:461:
        	Error Trace:	/Users/shaunak/development/github/opentelemetry-collector/exporter/otlpexporter/otlp_test.go:461
        	Error:      	Condition never satisfied
        	Test:       	TestSendTracesWhenEndpointHasHttpScheme/Use_https_scheme
=== RUN   TestSendTracesWhenEndpointHasHttpScheme/Use_http_scheme
--- FAIL: TestSendTracesWhenEndpointHasHttpScheme (10.02s)
    --- FAIL: TestSendTracesWhenEndpointHasHttpScheme/Use_https_scheme (10.01s)
    --- PASS: TestSendTracesWhenEndpointHasHttpScheme/Use_http_scheme (0.01s)
=== RUN   TestSendProfilesWhenEndpointHasHttpScheme
=== RUN   TestSendProfilesWhenEndpointHasHttpScheme/Use_https_scheme
    otlp_test.go:1034:
        	Error Trace:	/Users/shaunak/development/github/opentelemetry-collector/exporter/otlpexporter/otlp_test.go:1034
        	Error:      	Condition never satisfied
        	Test:       	TestSendProfilesWhenEndpointHasHttpScheme/Use_https_scheme
=== RUN   TestSendProfilesWhenEndpointHasHttpScheme/Use_http_scheme
--- FAIL: TestSendProfilesWhenEndpointHasHttpScheme (10.02s)
    --- FAIL: TestSendProfilesWhenEndpointHasHttpScheme/Use_https_scheme (10.01s)
    --- PASS: TestSendProfilesWhenEndpointHasHttpScheme/Use_http_scheme (0.01s)
FAIL
FAIL	go.opentelemetry.io/collector/exporter/otlpexporter	20.464s
?   	go.opentelemetry.io/collector/exporter/otlpexporter/internal/metadata	[no test files]
FAIL

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions