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

loki receiver - basic authentication #26352

Closed
sairamsadanala opened this issue Aug 31, 2023 · 3 comments · Fixed by #26369
Closed

loki receiver - basic authentication #26352

sairamsadanala opened this issue Aug 31, 2023 · 3 comments · Fixed by #26369
Assignees
Labels
extension/basicauth question Further information is requested receiver/loki

Comments

@sairamsadanala
Copy link

Component(s)

receiver/loki

Describe the issue you're reporting

Context: I am trying to setup otelcol-contrib abstraction layer with loki receiver implementing basic authentication and with transform processor to set dynamic tenant(X-scope-OrgID) in the request header while exporting to Grafana Loki endpoint.

Issue: It does not sound like loki receiver support basic authentication.

@sairamsadanala sairamsadanala added the needs triage New item requiring triage label Aug 31, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@bryan-aguilar bryan-aguilar added question Further information is requested extension/basicauth and removed needs triage New item requiring triage labels Sep 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

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

@jpkrohling
Copy link
Member

It does support, as it uses the common HTTP and gRPC server settings. Something like this should work:

extensions:
  basicauth:
    htpasswd: 
      inline: "admin: $apr1$so2zr16x$jWvnqhK3fg24qjBB4iN6x/"

receivers:
  loki:
    protocols:
      http:
        auth:
          authenticator: basicauth
      grpc:
        auth:
          authenticator: basicauth

exporters:
  logging:

service:
  extensions: [basicauth]
  pipelines:
    logs:
      receivers: [loki]
      processors:
      exporters: [logging]

I'll work on documenting this.

@jpkrohling jpkrohling self-assigned this Sep 1, 2023
dmitryax pushed a commit to open-telemetry/opentelemetry-collector that referenced this issue Sep 1, 2023
Based on
open-telemetry/opentelemetry-collector-contrib#26352,
I realized that the confighttp and configgrpc helpers lack links to the
configauth package. This PR fixes that and updates the list of known
authenticators.

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
jpkrohling added a commit that referenced this issue Sep 4, 2023
Add a link from the Loki receiver's readme to some of the helpers that
can be used with it.

closes
#26352

Signed-off-by: Juraci Paixão Kröhling <[email protected]>

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension/basicauth question Further information is requested receiver/loki
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants