-
Notifications
You must be signed in to change notification settings - Fork 54
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
Export Otel configuration in shell steps: OTEL_EXPORTER_OTLP_ENDPOINT
, OTEL_EXPORTER_OTLP_HEADERS
…
#155
Conversation
…`, `OTEL_EXPORTER_OTLP_HEADERS`...
OTEL_EXPORTER_OTLP_ENDPOINT
…OTEL_EXPORTER_OTLP_ENDPOINT
, OTEL_EXPORTER_OTLP_HEADERS
…
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.
is it possible to mask those env variables to avoid exposing them?
For instance:
- I built a shared library step to expose those env variables and mask them in Set OTEL_EXPORTER_OTLP_HEADERS elastic/apm-pipeline-library#1234 and Provide OTEL context elastic/apm-pipeline-library#1218
Great idea @v1v. I propose to do it as a subsequent milestone. In the meantime, people can disable the feature if needed. Would that work for you? |
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.
Missing the new configuration in the https://github.com/jenkinsci/opentelemetry-plugin#configuration-as-code section
src/main/java/io/jenkins/plugins/opentelemetry/authentication/BearerTokenAuthentication.java
Outdated
Show resolved
Hide resolved
@@ -71,6 +75,8 @@ | |||
|
|||
private transient OpenTelemetrySdkProvider openTelemetrySdkProvider; | |||
|
|||
private boolean dontExportOtelConfigurationAsEnvironmentVariables; |
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 propose to do it as a subsequent milestone. In the meantime, people can disable the feature if needed. Would that work for you?
What do you think to set it false
meantime? Then, whoever enables it will know the security implications
private boolean dontExportOtelConfigurationAsEnvironmentVariables; | |
private boolean dontExportOtelConfigurationAsEnvironmentVariables = false; |
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 wanted to enable this by default as I feel it's not a security problem in most cases because it's just telemetry.
false
is the default value as the config attribute is "Don't export Otel Configuration as Environment Variables". Due to the way Jenkins XStream works, there would be some work to make it true
by default, I would define the opposite variable instead: exportOtelConfigurationAsEnvironmentVariables
.
…BearerTokenAuthentication.java Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
FYI I'm trying to mask credentials in the console: https://groups.google.com/g/jenkinsci-dev/c/FMl_plHvPv8 |
… variables" to prevent security leaks
@v1v I followed your recommendation and I disabled the feature by default to ensure there is no surprise. |
Export Otel configuration in shell steps
OTEL_EXPORTER_OTLP_ENDPOINT
,OTEL_EXPORTER_OTLP_HEADERS
...Tested with https://github.com/cyrille-leclerc/opentelemetry-maven-extension