-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[otlp] Add mTLS Support for OTLP Exporter #5918
base: main
Are you sure you want to change the base?
Conversation
@@ -28,6 +28,26 @@ protected override HttpContent CreateHttpContent(OtlpCollector.ExportTraceServic | |||
return new ExportRequestContent(exportRequest); | |||
} | |||
|
|||
private static HttpClient ModifyHttpClient(OtlpExporterOptions options, HttpClient httpClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't just throw away the HttpClient
and make a new one. Users are able to configure SSL/TLS today using factory:
opentelemetry-dotnet/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Line 134 in 5dff99f
public Func<HttpClient> HttpClientFactory |
This change will break any user doing that or doing anything else to the HttpClient they are intending to use here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified a little bit, does it look fine? @CodeBlanch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the design looks ok, I will start to write tests :)
…9CertificateLoader
…9CertificateLoader
…9CertificateLoader
…9CertificateLoader
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5918 +/- ##
==========================================
+ Coverage 83.38% 86.36% +2.97%
==========================================
Files 297 262 -35
Lines 12531 11893 -638
==========================================
- Hits 10449 10271 -178
+ Misses 2082 1622 -460
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Just for your info, |
@sandy2008 I recommend putting this on hold for a month. We are working on a custom serialization (#5730) and also we plan to handle GRPC without relying on Grpc.Net packages and removing dependencies on Google Protobuf and GRPC libraries. This will impact the part where you are adding support for mTLS. |
Hi :) @rajkumar-rangaraj |
Today, we had a discussion on this topic in the SIG meeting. We all feel it is better to hold off on this work as this space is expected to change drastically in the coming weeks. We thought it would be beneficial if you could join the next SIG meeting to discuss it further. |
Thank you for the update. @rajkumar-rangaraj Could you please let me know the time and participation details for the next SIG meeting? I think it’s important for @sokoide , as a co-author, to attend as well, since I might not be able to cover everything alone. |
Please check the details here - https://github.com/open-telemetry/opentelemetry-dotnet?tab=readme-ov-file#contributing |
Thank you for the details! We’ll join the SIG meeting scheduled for November 5 at 16:00 PT (November 6, 11:00 JST). Looking forward to it! |
{ | ||
var trustedCertificate = X509Certificate2.CreateFromPemFile(this.CertificateFile); | ||
|
||
handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want users of this API being able to add their custom validation callbacks next to this one?
Fixes #2009
Based on PR
Changes
This pull request introduces support for mutual TLS (mTLS) in the OpenTelemetry Protocol (OTLP) Exporter, allowing secure gRPC connections over HTTPS and mTLS supports for HTTP Protocol.
Key Changes:
OTEL_EXPORTER_OTLP_CERTIFICATE
OTEL_EXPORTER_OTLP_CLIENT_KEY
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes