Basicauth Extension
contrib, k8s
Maintainers: @frzifus
Source: opentelemetry-collector-contrib
Overview
This extension implements bothconfigauth.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.
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.username_file: Path to a file containing the username. If set, takes precedence overusername. The file is watched for changes, allowing rotation without restarting the collector.client_auth.password: Password to use for client authentication.client_auth.password_file: Path to a file containing the password. If set, takes precedence overpassword. The file is watched for changes, allowing rotation without restarting the collector.
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
Configuration
Example Configuration
Last generated: 2026-04-13