Authenticator - ベアラー拡張機能
configauth.ServerAuthenticator と configauth.ClientAuthenticator の両方を実装します。http と gRPC の両方のエクスポータで auth 設定内で使用して、RPC コールのたびに静的トークンを埋め込むことができます。
bearertokenauth 拡張は、configauth.ServerAuthenticator と configauth.ClientAuthenticator の両方を実装します。http と gRPC の両方のエクスポータで auth 設定内で使用して、RPC コールのたびに静的トークンを埋め込むことができます。
以下が必要です:
-
認証タイプを
bearertokenauthに設定する必要があります。 -
エクスポーターでトランスポートレイヤーセキュリティを有効にする必要があります。
はじめに
以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:
-
Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:
-
次のセクションで説明するように、
bearertokenauthエクステンションを設定します。 -
Collector を再起動します。
設定オプション
以下の設定オプションが利用可能です:
-
filenameします。各クライアントコールで送信される認証トークンを含むファイル名。 -
tokenします。gRPC クライアントコールごとにメタデータとして送信される静的認証トークン。このトークンの値は、送信時にリクエストヘッダー(HTTP の場合)やメタデータ(gRPC の場合)の認証キーの値として使用される前に、先頭に${scheme}が付加されます。
filename または token のいずれかが必要です。両方が指定されている場合、tokenフィールドの値は無視されます。
オプションで、次を設定することもできます。
-
scheme。デフォルトではBearerです。認証スキーム名を指定します。
サンプル構成
コンポーネントを有効にするには、設定ファイルの extensions セクションに bearertokenauth を追加し、service セクションの任意のパイプラインに拡張子を含めます。例:
extensions:
bearertokenauth:
token: "somerandomtoken"
filename: "file-containing.token"
bearertokenauth/withscheme:
scheme: "Bearer"
token: "randomtoken"
receivers:
hostmetrics:
scrapers:
memory:
otlp:
protocols:
grpc:
exporters:
otlp/withauth:
endpoint: 0.0.0.0:5000
ca_file: /tmp/certs/ca.pem
auth:
authenticator: bearertokenauth
otlphttp/withauth:
endpoint: http://localhost:9000
auth:
authenticator: bearertokenauth/withscheme
service:
extensions: [bearertokenauth, bearertokenauth/withscheme]
pipelines:
metrics:
receivers: [hostmetrics]
processors: []
exporters: [otlp/withauth, otlphttp/withauth]
設定
次の表は、エクステンションの設定オプションを示しています:
トラブルシューティング
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
-
Submit a case in the Splunk Support Portal.
-
Contact Splunk Support.
Available to prospective customers and free trial users
-
Ask a question and get answers through community support at Splunk Answers.
-
Join the Splunk community #observability Slack channel to communicate with customers, partners, and Splunk employees worldwide.