Skip to content
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

Bearer extension authenticator against local endpoint #35387

Open
ilaikim99 opened this issue Sep 24, 2024 · 3 comments
Open

Bearer extension authenticator against local endpoint #35387

ilaikim99 opened this issue Sep 24, 2024 · 3 comments

Comments

@ilaikim99
Copy link

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

@ilaikim99 ilaikim99 added enhancement New feature or request needs triage New item requiring triage labels Sep 24, 2024
Copy link
Contributor

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

@atoulme
Copy link
Contributor

atoulme commented Oct 29, 2024

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

@atoulme atoulme removed the needs triage New item requiring triage label Oct 29, 2024
@jpkrohling
Copy link
Member

The config you shared looks odd. Where did you get it from? Here's an excerpt from the documentation:

extensions:
  bearertokenauth:
    token: "somerandomtoken"
    filename: "file-containing.token"

In any case, it's not very clear what you want to achieve. Do you have an IDP like Keycloak somewhere and you want the Collector to authenticate against it? In that case, you probably need the OIDC auth extension instead.

https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/oidcauthextension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants