Skip to content

[receiver/sqlserver] x509 negativeserial issue#38141

Merged
atoulme merged 3 commits into
open-telemetry:mainfrom
sincejune:sqlserver-x509-negativeserial
Mar 4, 2025
Merged

[receiver/sqlserver] x509 negativeserial issue#38141
atoulme merged 3 commits into
open-telemetry:mainfrom
sincejune:sqlserver-x509-negativeserial

Conversation

@sincejune
Copy link
Copy Markdown
Contributor

Description

SQL Server receiver now requires a positive serial number for X509 certificates due to the Go 1.23 adoption in #38099

Link to tracking issue

n/a

Testing

n/a

Documentation

n/a

@sincejune
Copy link
Copy Markdown
Contributor Author

SQL Server docker users may run into an issue that the collector fails to parse certificate from server due to x509: negative serial number. That's because we adopted Go 1.23 starting from contrib v0.121.0:

Before Go 1.23, ParseCertificate accepted certificates with negative serial numbers.
This behavior can be restored by including "x509negativeserial=1" in the GODEBUG environment variable.

references:

  1. https://pkg.go.dev/crypto/x509#ParseCertificate
  2. Default TLS cert uses negative serial number microsoft/mssql-docker#895

@sincejune
Copy link
Copy Markdown
Contributor Author

This change is actually not in the release notes of Go 1.23.
Since the SQL Server receiver uses the underlying scraperhelper dependency (which raises negative serial number issue) in core repo, should we consider adding a note at the project level?

cc @atoulme @bogdandrutu @mx-psi @songy23

@MovieStoreGuy
Copy link
Copy Markdown
Contributor

This change is actually not in the release notes of Go 1.23. Since the SQL Server receiver uses the underlying scraperhelper dependency (which raises negative serial number issue) in core repo, should we consider adding a note at the project level?

cc @atoulme @bogdandrutu @mx-psi @songy23

So this raises an interesting question, do we raise a breaking change for each component that would be using the impacted package, or raise it a breaking change for the project.

I'll delegate that to @open-telemetry/collector-approvers to see what they say.

@atoulme atoulme merged commit d2a9385 into open-telemetry:main Mar 4, 2025
@github-actions github-actions Bot added this to the next release milestone Mar 4, 2025
@sincejune sincejune deleted the sqlserver-x509-negativeserial branch March 29, 2025 10:08
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