Skip to content

Commit

Permalink
[extension/bearerauth] [docs ] Update settings documentation (#16171)
Browse files Browse the repository at this point in the history
Update the readme to remove references to deprecated struct GRPCClientAuthenticator and provide correct usage of configuration
  • Loading branch information
neelayu committed Nov 8, 2022
1 parent 367a1bb commit 09c8120
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions extension/bearertokenauthextension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
| Distributions | [contrib] |


This extension implements `configauth.GRPCClientAuthenticator` and is to be used in gRPC receivers inside the `auth` settings as a means
to embed a static token for every RPC call that will be made.
This extension implements `configauth.ClientAuthenticator` and can be used in both http and gRPC receivers inside the `auth` settings, as a means to embed a static token for every RPC call that will be made.

The authenticator type has to be set to `bearertokenauth`.

## Configuration

One of the following two options is required. If a token **and** a tokenfile are specified, the token is **ignored**:

- `scheme`: Specifies the auth scheme name. Defaults to "Bearer".
- `scheme`: Specifies the auth scheme name. Defaults to "Bearer". Optional.

- `token`: Static authorization token that needs to be sent on every gRPC client call as metadata.
This token is prepended by `${scheme}` before being sent as a value of "authorization" key in
RPC metadata.

- `filename`: Name of file that contains a authorization token that needs to be sent on every
gRPC client call as metadata.
This token is prepended by `${scheme}` before being sent as a value of "authorization" key in
RPC metadata.
- `filename`: Name of file that contains a authorization token that needs to be sent in every client call.

Either one of `token` or `filename` field is required. If both are specified, then the `token` field value is **ignored**. In any case, the value of the token will be prepended by `${scheme}` before being sent as a value of "authorization" key in the request header in case of HTTP and metadata in case of gRPC.

**Note**: bearertokenauth requires transport layer security enabled on the exporter.

Expand Down Expand Up @@ -57,7 +50,7 @@ exporters:
otlphttp/withauth:
endpoint: http:https://localhost:9000
auth:
authenticator: bearertokenauth
authenticator: bearertokenauth/withscheme

service:
extensions: [bearertokenauth, bearertokenauth/withscheme]
Expand Down

0 comments on commit 09c8120

Please sign in to comment.