You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension


Version published
Created

Readme

Source

Basic Authenticator

Status
Stabilitybeta
Distributionscontrib
IssuesOpen issues Closed issues
Code Owners@jpkrohling, @frzifus
Emeritus@svrakitin

This extension implements both configauth.ServerAuthenticator and configauth.ClientAuthenticator to authenticate clients and servers using Basic Authentication. The authenticator type has to be set to basicauth.

When used as ServerAuthenticator, if the authentication is successful client.Info.Auth will expose the following attributes:

  • username: The username of the authenticated user.
  • raw: Raw base64 encoded credentials.

The configuration should specify only one instance of basicauth extension for either client or server authentication.

The following are the configuration options:

  • htpasswd.file: The path to the htpasswd file.
  • htpasswd.inline: The htpasswd file inline content.
  • client_auth.username: Username to use for client authentication.
  • client_auth.password: Password to use for client authentication.

To configure the extension as a server authenticator, either one of htpasswd.file or htpasswd.inline has to be set. If both are configured, htpasswd.inline credentials take precedence.

To configure the extension as a client authenticator, client_auth has to be set.

If both the options are configured, the extension will throw an error.

Configuration

extensions:
  basicauth/server:
    htpasswd: 
      file: .htpasswd
      inline: |
        ${env:BASIC_AUTH_USERNAME}:${env:BASIC_AUTH_PASSWORD}
  
  basicauth/client:
    client_auth: 
      username: username
      password: password

receivers:
  otlp:
    protocols:
      http:
        auth:
          authenticator: basicauth/server

processors:

exporters:
  otlp:
    auth:
      authenticator: basicauth/client

service:
  extensions: [basicauth/server, basicauth/client]
  pipelines:
    traces:
      receivers: [otlp]
      processors: []
      exporters: [otlp]

FAQs

Package last updated on 16 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc