You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
:description: Implements both ``configauth.ServerAuthenticator`` and ``configauth.ClientAuthenticator``. It can be used in both http and gRPC exporters inside the ``auth`` settings to embed a static token for every RPC call made.
9
9
10
-
The ``basicauth`` 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``.
10
+
The ``bearertokenauth`` extension implements both ``configauth.ServerAuthenticator`` and ``configauth.ClientAuthenticator``. It can be used in both http and gRPC exporters inside the ``auth`` settings to embed a static token for every RPC call made.
11
11
12
-
When used to authenticate servers, if the authentication is successful, ``client.Info.Auth`` exposes the following attributes:
12
+
The following is required:
13
13
14
-
* ``username``: The username of the authenticated user.
15
-
* ``raw``: Raw base64 encoded credentials.
14
+
* You need to set the authenticator type to ``bearertokenauth``.
16
15
17
-
.. caution:: You can either authenticate servers or clients with the extension. If you configure both options, the extension throws an error. See more in :ref:`basic-auth-extension-settings`.
16
+
* You need to enable transport layer security on the exporter.
18
17
19
18
Get started
20
19
======================
21
20
22
21
Follow these steps to configure and activate the component:
23
22
24
-
1. Deploy the Splunk Distribution of the the OpenTelemetry Collector to your host or container platform:
23
+
1. Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform:
25
24
26
25
- :ref:`otel-install-linux`
27
26
- :ref:`otel-install-windows`
28
27
- :ref:`otel-install-k8s`
29
28
30
-
2. Configure the ``basicauth`` extension as described in the next section.
29
+
2. Configure the ``bearertokenauth`` extension as described in the next section.
31
30
3. Restart the Collector.
32
31
33
-
Sample configurations
32
+
Configuration options
34
33
--------------------------------------------
35
34
36
-
To activate the component add ``basicauth`` to the ``extensions`` section of your configuration file, as shown in the following example:
35
+
The following configuration options are available:
37
36
38
-
.. code:: yaml
37
+
* ``filename``. Name of file that contains the authorization token sent in every client call.
* ``token``. Static authorization token sent on every gRPC client call as metadata. The value of the token is prepended by ``${scheme}`` before being sent as a value of the authorization key in the request header (for HTTP) and metadata (for gRPC).
51
40
52
-
receivers:
53
-
otlp:
54
-
protocols:
55
-
http:
56
-
auth:
57
-
authenticator: basicauth/server
41
+
.. note:: Either ``filename`` or ``token`` are required. If both are specified, then the ``token`` field value is ignored.
58
42
59
-
processors:
60
-
61
-
exporters:
62
-
otlp:
63
-
auth:
64
-
authenticator: basicauth/client
43
+
Optionally, you can also configure:
65
44
66
-
To complete the configuration, include the extension in any pipeline of the ``service`` section of your
67
-
configuration file. For example:
45
+
* ``scheme``. ``Bearer`` by default. Specifies the auth scheme name.
The following example illustrates how to configure the ``basicauth`` extension for the :ref:`simple-prometheus-receiver`:
50
+
To activate the component add ``bearertokenauth`` to the ``extensions`` section of your configuration file and include the extension in any pipeline of the ``service`` section. For example:
You can either authenticate servers or clients with the extension. If you configure both options, the extension throws an error.
129
-
130
-
* To configure the extension as a server authenticator, set either ``htpasswd.file`` or ``htpasswd.inline``. If you configure both, ``htpasswd.inline`` credentials takes precedence.
0 commit comments