Skip to content

chore(): Refactor TLS and mTLS support in OpenTelemetry Protocol Expo…#2

Closed
sandy2008 wants to merge 53 commits intomainfrom
feat/tls-mtls
Closed

chore(): Refactor TLS and mTLS support in OpenTelemetry Protocol Expo…#2
sandy2008 wants to merge 53 commits intomainfrom
feat/tls-mtls

Conversation

@sandy2008
Copy link
Owner

@sandy2008 sandy2008 commented Dec 15, 2025

Fixes open-telemetry#6764
Design discussion issue open-telemetry#6764

Changes

  • Split TLS vs mTLS config: OtlpTlsOptions for server trust (OTEL_EXPORTER_OTLP_CERTIFICATE) and OtlpMtlsOptions for client auth (OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE/OTEL_EXPORTER_OTLP_CLIENT_KEY).
  • Refactor HttpClient security setup to Strategy + Factory: IHttpClientSecurityConfigurer + OtlpHttpClientSecurityConfigurerFactory (trusted CA + client cert configurers).
  • Rename internal helpers to remove “mTLS” from CA-trust flow (OtlpCertificateManager, OtlpTlsHttpClientFactory) and update docs/tests accordingly.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

sandy2008 and others added 30 commits June 20, 2025 17:34
…ostics

Co-authored-by: Martin Costello <martin@martincostello.com>
…null reference

Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
sandy2008 and others added 23 commits June 25, 2025 18:49
…rter

- Removed the OtlpMtlsHttpClientFactory and integrated its functionality into a new OtlpTlsHttpClientFactory to handle both TLS and mTLS configurations.
- Updated OtlpExporterOptions to include TlsOptions alongside MtlsOptions, allowing for more flexible configuration.
- Introduced OtlpTlsOptions class to manage TLS-specific settings, including certificate path and validation options.
- Modified environment variable handling to support both TLS and mTLS configurations.
- Updated tests to cover new TLS functionality and ensure proper handling of certificates and options.
- Removed unnecessary mTLS options and streamlined the logic for enabling mTLS based solely on client certificate presence.
…rter

- Removed the OtlpMtlsHttpClientFactory and integrated its functionality into a new OtlpTlsHttpClientFactory to handle both TLS and mTLS configurations.
- Updated OtlpExporterOptions to include TlsOptions alongside MtlsOptions, allowing for more flexible configuration.
- Introduced OtlpTlsOptions class to manage TLS-specific settings, including certificate path and validation options.
- Modified environment variable handling to support both TLS and mTLS configurations.
- Updated tests to cover new TLS functionality and ensure proper handling of certificates and options.
- Removed unnecessary mTLS options and streamlined the logic for enabling mTLS based solely on client certificate presence.
…rter

- Removed the OtlpMtlsHttpClientFactory and integrated its functionality into a new OtlpTlsHttpClientFactory to handle both TLS and mTLS configurations.
- Updated OtlpExporterOptions to include TlsOptions alongside MtlsOptions, allowing for more flexible configuration.
- Introduced OtlpTlsOptions class to manage TLS-specific settings, including certificate path and validation options.
- Modified environment variable handling to support both TLS and mTLS configurations.
- Updated tests to cover new TLS functionality and ensure proper handling of certificates and options.
- Removed unnecessary mTLS options and streamlined the logic for enabling mTLS based solely on client certificate presence.
@github-actions
Copy link

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale label Dec 29, 2025
@sandy2008 sandy2008 closed this Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OTLP] Make OTEL_EXPORTER_OTLP_CERTIFICATE independent from mTLS

1 participant