-
Notifications
You must be signed in to change notification settings - Fork 14
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
Authz headers handled and set as attributes for traces #350
base: main
Are you sure you want to change the base?
Authz headers handled and set as attributes for traces #350
Conversation
…et as attributes of a span
pkg/interlink/config.go
Outdated
@@ -113,25 +109,24 @@ func SetupTelemetry(ctx context.Context) (*sdktrace.TracerProvider, error) { | |||
Certificates: []tls.Certificate{cert}, | |||
RootCAs: certPool, | |||
MinVersion: tls.VersionTLS12, | |||
InsecureSkipVerify: false, | |||
InsecureSkipVerify: true, // #nosec |
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.
why exactly? @Bianco95 :)
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 CA used for the mTLS mechanism is not verified by a trusted authority, an error occurred when a trace is sent to the Tempo endpoint, specifically
2025/01/08 12:39:19 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority
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.
alright, only if you open an issue where we track that this value should be passed as a configuration parameter :) it can go for a later time, but we need to keep track
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.
Since this relates to telemetry configuration, I propose adding an environment variable, similar to how other telemetry parameters are handled. By default, insecureSkipVerify will be set to false, but users will have the option to override this and set it to true if needed.
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.
+1
…default, it is set to false
@Bianco95 can you document this env variable in the documenation of the monitoring as well? |
…INSECURE_SKIP_VERIFY)
Monitoring documentation has been properly updated |
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.
Lgtm
Although, the integration test seems loke not working... need to check it carefully |
The SetupTelemetry function has been updated to dynamically create a service with a unique name depending on whether it is invoked by the VK or the InterLink API.
Additionally, information extracted from the AUTHZ headers is now included as attributes of the span associated with different HTTP calls.