open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.06k stars 2.36k forks source link

Bearer extension authenticator against local endpoint #35387

Open ilaikim99 opened 1 month ago

ilaikim99 commented 1 month ago

Component(s)

No response

Is your feature request related to a problem? Please describe.

I need the collector receiver to authenticate against a local endpoint, passing it the bearer token. The extension only supports authenticating against a static token.

Describe the solution you'd like

I would like to be able to do something like this image And the token from the otlp receiver will be passed in the Authorization header.

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 1 month ago

Pinging code owners for extension/bearertokenauth: @jpkrohling @frzifus. See Adding Labels via Comments if you do not have permissions to add labels yourself.

atoulme commented 1 week ago

This is a string interpolation in our config. I believe this is supported in general in the yaml with expressions such as ${env:ACCESS_TOKEN}. See https://opentelemetry.io/docs/collector/configuration/#environment-variables