Skip to content

bearertokenauth extensions does not support configauth.ServerAuthenticator #22737

@frzifus

Description

@frzifus

Component(s)

extension/bearertokenauth

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

currently it is not possible to use the bearertokenauth extension as server authenticator.

---
extensions:
  bearertokenauth/withscheme:
    scheme: "Bearer"
    token: "randomtoken"

receivers:
  otlp:
    protocols:
      grpc:
        auth:
          authenticator: bearertokenauth/withscheme
      http:

exporters:
  logging:
    verbosity: detailed

service:
  extensions: [bearertokenauth/withscheme]
  pipelines:
    metrics:
      receivers: [otlp]
      exporters: [logging]

This configuration leads to:

2023/05/23 16:00:15 collector server run finished with error: cannot start pipelines: requested authenticator is not a server authenticator

Describe the solution you'd like

bearertokenauth should implement configauth.ServerAuthenticator like e.g. basicauth does.

Describe alternatives you've considered

No response

Additional context

Testing:

telemetrygen metrics --otlp-insecure --duration 15s --rate 4 --otlp-http=false --otlp-header authorization=\"Bearer\ randomtoken\"

cc @sallyom

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions