Skip to content

Conversation

axw
Copy link
Contributor

@axw axw commented Aug 13, 2025

Description

Under Go 1.24, use of RSA keys with fewer than 1024 bits leads to an error. This causes the tests to fail like so:

=== RUN   TestRoundTripper
    extension_test.go:58:
                Error Trace:
/home/andrew/projects/opentelemetry-collector-contrib/extension/asapauthextension/extension_test.go:58
                Error:          Received unexpected error:
                                crypto/rsa: 512-bit keys are insecure
(see https://go.dev/pkg/crypto/rsa#hdr-Minimum_key_size)
                Test:           TestRoundTripper
--- FAIL: TestRoundTripper (0.00s)

Rather than using a hard-coded key pair, we can use httptest's internal testing key pair which can be relied on to always be valid.

Link to tracking issue

open-telemetry/opentelemetry-collector#13627

Testing

N/A

Documentation

N/A

Under Go 1.24, use of RSA keys with fewer than
1024 bits leads to an error. This causes the tests
to fail like so:

```
=== RUN   TestRoundTripper
    extension_test.go:58:
                Error Trace:
/home/andrew/projects/opentelemetry-collector-contrib/extension/asapauthextension/extension_test.go:58
                Error:          Received unexpected error:
                                crypto/rsa: 512-bit keys are insecure
(see https://go.dev/pkg/crypto/rsa#hdr-Minimum_key_size)
                Test:           TestRoundTripper
--- FAIL: TestRoundTripper (0.00s)
```
@axw
Copy link
Contributor Author

axw commented Aug 13, 2025

govulncheck is quite unhappy with the repo, but none of the extension issues are related to asapauthextension: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/16927008529/job/47964816560?pr=41966

@mx-psi mx-psi merged commit 5706400 into open-telemetry:main Aug 13, 2025
180 of 187 checks passed
@axw axw deleted the asapauthextension-go1.24 branch August 13, 2025 08:42
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.

5 participants