-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Opampextension - headers in received configs do not correctly marshal into "[REDACTED]" #32983
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @adil-sultan, thanks for reporting this. This is a known problem with how the Collector APIs unmarshal the config into a |
@evan-bradley That's great to hear. If there's a PR I can follow along with that would be much appreciated. Thanks! |
**Description:** <Describe what has changed.> Redacts primitive values in the effective config reported by the extension. Necessary for #31641 until open-telemetry/opentelemetry-collector#10139 is resolved. Relates to #32983
I'm closing this as solved via #32983. Right now we redact almost all values in the config, but we will work toward exposing non-sensitive values as we make progress in the Collector APIs or offer settings through the extension. |
Component(s)
extension/opamp
What happened?
Description
When we receive configs via the opamp extension, the header fields aren't being redacted correctly so we receive things like API keys in plain text. We believe this is due to ln272 in opamp_agent.go:
yaml.Marshal(o.effectiveConfig.ToStringMap())
where we convert the effectiveConfig.ToStringMap prior to marshaling.Steps to Reproduce
run the collector via the builder using a config w/ extension configured over WS - can use https://github.com/lightstep/otel-collector-charts/blob/main/example/vm/config.yaml as an example. The received config will contain unredacted Authorization headers
Add a opampextension to the effective.yaml used by opampextension.opamp_agent_test.TestComposeEffectiveConfig. Print the config and you'll see an unredacted Authorization Headers.
Expected Result
authorization:[REDACTED]
Actual Result
authorization: bearer superSecretToken
Collector version
v0.99.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: