Docs » Splunk Distribution of the OpenTelemetry Collector の利用開始 » Collector コンポーネント » Collectorコンポーネント: エクステンション » OAuth2 Client Auth extension

OAuth2 Client Auth extension 🔗

The oauth2client extension provides OAuth2 client credentials flow authentication for HTTP and gRPC based exporters. The extension automatically fetches and refreshes the token after it expires.

For further details about the OAuth2 Client Credentials flow (2-legged workflow), refer to Client Credentials Grant in the OAuth 2.0 authorization framework specification.

For information about the available exporters, see Collectorコンポーネント: エクスポーター.

はじめに 🔗

以下の手順に従って、コンポーネントの設定とアクティベーションを行ってください:

  1. Splunk Distribution of the OpenTelemetry Collector をホストまたはコンテナプラットフォームにデプロイします:

  1. 次のセクションで説明するように、エクステンションを設定します。

  2. Collector を再起動します。

サンプル構成 🔗

To activate the component, add oauth2client to the extensions section of your configuration file:

extensions:
  oauth2client:

設定を完了するには、設定ファイルの service セクションに拡張子を含めます:

service:
  extensions: [oauth2client]

注釈

Set the authenticator type to oauth2client in the exporter using the OAuth2 Client Auth extension. See 設定例.

コンフィギュレーション設定 🔗

エクステンションの設定には以下の設定が必要です:

  • token_url. The resource server’s token endpoint URLs.

  • client_id. The client identifier issued to the client.

  • client_id_file. The file path to retrieve the client identifier issued to the client. The extension reads this file and updates the client ID when you need to issue a new token.

    • This parameter allows you to dynamically change the client credentials by modifying the file contents when, for example, you need to rotate the token.

    • This setting takes precedence over client_id.

  • client_secret. The secret string associated with the identifier.

  • client_secret_file. The file path to retrieve the secret string associated with the identifier. The extension reads this file and updates the client secret when you need to issue a new token.

    • This paramater allows you to dynamically change the client credentials by modifying the file contents when, for example, you need to rotate the token.

    • This setting takes precedence over client_secret.

  • endpoint_params. Additional parameters sent to the token endpoint.

  • scopes. Optional. Requested permissions associated to the client.

  • timeout. Optional. Specifies the timeout on the underlying client for the authorization server to fetch the tokens, both initially and while refreshing.

    • If void, there is no timeout on the client.

For more information on the client side TLS settings, see TLS configuration settings in GitHub.

設定例 🔗

これはエクステンションの設定例です:

extensions:
  oauth2client:
    client_id: someclientid
    client_secret: someclientsecret
    endpoint_params:
      audience: someaudience
    token_url: https://example.com/oauth2/default/v1/token
    scopes: ["api.metrics"]
    # tls settings for the token client
    tls:
      insecure: true
      ca_file: /var/lib/mycert.pem
      cert_file: certfile
      key_file: keyfile
    # timeout for the token client
    timeout: 2s

receivers:
  hostmetrics:
    scrapers:
      memory:
  otlp:
    protocols:
      grpc:

exporters:
  otlphttp/withauth:
    endpoint: http://localhost:9000
    auth:
      authenticator: oauth2client

  otlp/withauth:
    endpoint: 0.0.0.0:5000
    tls:
      ca_file: /tmp/certs/ca.pem
    auth:
      authenticator: oauth2client

service:
  extensions: [oauth2client]
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [otlphttp/withauth, otlp/withauth]

設定 🔗

The following table shows the configuration options for the oauth2client extension:

トラブルシューティング 🔗

Splunk Observability Cloudをご利用のお客様で、Splunk Observability Cloudでデータを確認できない場合は、以下の方法でサポートを受けることができます。

Splunk Observability Cloudをご利用のお客様

見込み客および無料トライアルユーザー様

  • Splunk Answers のコミュニティサポートで質問し、回答を得る

  • Splunk #observability ユーザーグループの Slack チャンネルに参加して、世界中の顧客、パートナー、Splunk 社員とのコミュニケーションを図る。参加するには、Get Started with Splunk Community マニュアルの チャットグループ を参照してください。

This page was last updated on 2024年05月31日.