Docs » 認証とセキュリティ » Splunk Observability Cloudを使用して認証トークンを作成および管理する » Splunk Observability Cloudを使用した組織のアクセストークンの作成および管理

Splunk Observability Cloudを使用した組織のアクセストークンの作成および管理 🔗

アクセストークン(組織トークン)は、有効期間の長い組織レベルのトークンです。アクセストークンは、管理者アクセス権を持つユーザーに関連付けられたトークンを必要とするものを除いて、すべてのAPIリクエストで使用できます。詳細は Splunk Observability Cloudを使用したユーザー APIアクセストークンの取得と管理 を参照してください。

アクセストークンを使って、以下のことが実行できます:

  • APIコールを使ってSplunk Observability Cloudにデータポイントを送信する。

  • APIを呼び出すスクリプトを実行する。

  • ユーザー、サービス、チームなど、さまざまなグループ別の使用状況を追跡してリソースを管理する。例えば、米国とカナダにユーザーがいてSplunk Observability Cloudにデータを送信しているとします。それぞれのグループに固有のアクセストークンを与えると、それぞれの国から入るデータ量を比較することができます。

注釈

デフォルトでは、管理者であるユーザーのみがすべてのアクセストークンを検索および表示できます。このデフォルトは、アクセストークンを作成または更新するときに変更できます。

組織内でトークンへのアクセス権を持つパワーユーザーにはバナーが表示されますが、トークンをローテーションする必要があることを伝えるメールは管理者のみに届きます。

トークンの有効期限 🔗

トークンの有効期限は、アクセストークンページで確認できます。このページを表示するには、Settings を選択し、Access tokens を選択します。デフォルトでは、アクセストークンの有効期限は作成日から30日です。トークンの有効期限が切れる前にトークンをローテーションすることも、トークン作成時に有効期限のデフォルトを変更することもできます。詳細については、アクセストークンのローテーション および Configure an expiration date を参照してください。

By default, every organization admin receives an email 30 days before a token in their org expires. The email includes a link to Splunk Observability Cloud that displays a list of expiring tokens. To change the expiration reminder date, see Configure an expiration date.

デフォルトのアクセストークン 🔗

デフォルトでは、どの組織にも組織レベルのアクセストークンが1つあります。追加のトークンを作成しない場合、Splunk Observability Cloudにデータを送信するすべてのAPIリクエストは、このアクセストークンを使用する必要があります。

アクセストークンの管理 🔗

To manage your access (org) tokens, follow these steps:

  1. Settings メニューを開きます。

  2. Select Access Tokens.

  3. StatusScope のフィルターを使用しするか、検索バーにトークン名を入力して、トークンを見つけます。

  4. トークン名の横にある展開アイコンを選択します。するとトークンの詳細が表示されます。

    Authorization Scopes フィールドの値によって許可されるアクセストークンの権限については、アクセストークンの作成 の権限に関するステップを参照してください。

  5. (Optional) If you’re an organization administrator, the actions menu (⋮) appears to the right side of the token listing. You can select token actions from this menu.

  6. トークンの権限とトークンの有効期限の設定を変更するには、それぞれ トークンの権限を変更するトークンの有効期限と有効期限アラートを変更する を参照してください。

トークンの権限を変更する 🔗

組織の管理者であれば、他のユーザーやチームのトークン権限を変更できます。

To change the token permissions, follow these steps:

  1. Select the Access Token Permissions box. Choose from the following permission options:

    • Only Admins can Read:管理者ユーザーのみが、新しいトークンの表示または読み取りができます。他のユーザーにはこのトークンが見えません。

    • Admins and Select Users or Teams can Read:管理者ユーザーと、あなたが選択したユーザーまたはチームが、新しいトークンの表示または読み取りができます。その他の人にはこのトークンが見えません。

    • Everyone can Read:組織内のすべてのユーザーとチームが、このトークンの表示および読み取りができます。

  2. 権限を追加するには、Access Token Permissions の下にある左矢印を選択します。

  3. If you selected Admins and Select Users or Teams can Read, select the users or teams to whom you want to give access.

  4. チームまたはユーザーを削除するには、チームまたはユーザー名の横にある削除アイコン( X )を選択します。

  5. トークンを更新するには、Update を選択します。

トークンの有効期限と有効期限アラートを変更する 🔗

To change the token expiration date and expiration alerts, follow these steps:

  1. In the token actions menu (⋮), select Expiration date.

  2. In the Expiration date box, select a new expiration date for the token.

  3. 有効期限アラートの表示対象を変更するには、以下のオプションから選択します:

    • Admins and users or teams with token permissions can receive alert:管理者とトークン権限を持つすべての人に、トークンの有効期限が近づくとアラートが届きます。

    • Only admins can receive alert: Only admins receive an alert when the token is close to expiring.

  4. 受信者が受け取るアラートの種類を設定します。

  5. 受信者がアラートを受け取るタイミングを変更します。例えば、値を 7d にすると、トークンの有効期限が切れる7日前に受信者がアラートを受け取ることを意味します。

  6. Select Update.

View and copy access token secrets 🔗

To view the token secret, select the token name and then select Show Token.

トークン値をコピーするには、Copy を選択します。アクセストークンを表示またはコピーするには、管理者である必要はありません。

アクセストークンの作成 🔗

To get started with creating an access token, follow these steps:

  1. Open the Splunk Observability Cloud main menu.

  2. Settings を選択し、Access Tokens を選択します。

  3. Select New Token.

次に、アクセストークン作成ガイド付きセットアップの各ステップを完了します:

注釈

You must be an organization administrator to create access tokens.

Name the token and select the authorization scope 🔗

トークンの作成を開始するには、トークンの名前とスコープを入力します。以下のステップを完了させます:

  1. 一意のトークン名を入力します。すでに使用されているトークン名を入力した場合、たとえそのトークンが非アクティブであっても、Splunk Observability Cloudはその名前を受け付けません。

  2. Select an authorization scope. See the following table for information about the authorization scopes:

    Authorization scope

    説明

    RUM token

    Use this scope to authenticate with RUM ingest endpoints. These endpoints use the following base URL: https://rum-ingest.<REALM>.signalfx.com/v1/rum.

    Ingest token

    Use this scope to authenticate with data ingestion endpoints and when using the Splunk Distribution of OpenTelemetry Collector. These endpoints use the following base URLs:

    • POST https://ingest.<REALM>.signalfx.com/v2/datapoint

    • POST https://ingest.<REALM>.signalfx.com/v2/datapoint/otlp

    • POST https://ingest.<REALM>.signalfx.com/v2/event

    • POST https://ingest.<REALM>.signalfx.com/v1/trace

    これらのエンドポイントに関する情報は、データポイントの送信 を参照してください。

    API token

    Use this scope to authenticate with Splunk Observability Cloud API endpoints. These endpoints use the following base URLs:

    • https://api.<REALM>.signalfx.com

    • wss://stream.<REALM>.signalfx.com

    API認証スコープでアクセストークンを作成する際、トークンに関連付けるSplunk Observability Cloudのロールを少なくとも1つ選択します。powerusageread_only から選択できます。Splunk Observability Cloudのロールの詳細については、Splunk Observability Cloud のロールについて を参照してください。

    これらのエンドポイントに関する情報は、Splunk Observability CloudのAPIエンドポイントの概要 を参照してください。

  3. (Optional) Add a description for the token.

  4. Select Next to continue to the next step.

Determine who can view and use the token 🔗

次に、トークンの権限を設定して、組織のユーザーやチームがトークンを使用できるようにします。以下のステップを完了させます:

  1. Edit the visibility permissions. To display the available permissions, select the Access Token Permissions box. The following permission options appear:

    • Only Admins can Read:管理者ユーザーのみが、新しいトークンの表示または読み取りができます。他のユーザーにはこのトークンが見えません。

    • Admins and Select Users or Teams can Read:管理者ユーザーと、あなたが選択したユーザーまたはチームが、新しいトークンの表示または読み取りができます。その他の人にはこのトークンが見えません。

    • Everyone can Read:組織内のすべてのユーザーとチームが、このトークンの表示および読み取りができます。

    To add permissions, select the arrow below Access Token Permissions.

  2. Admins and Select Users or Teams can Read を選択した場合は、アクセスを許可するユーザーまたはチームを選択します。手順は以下の通りです:

    1. Select Add Team or User. Splunk Observability Cloud displays a list of teams and users in your organization.

    2. 大きなリストからチームやユーザー名を見つけるには、検索ボックスにそれらの名前を入力します。Splunk Observability Cloudが一致する結果を返します。ユーザーまたはチームを選択します。

    3. さらにチームやユーザーを追加する場合は、Add Team or User を再度選択します。

      注釈

      ダイアログの途中で次のようなメッセージが表示される場合があります:

      あなたは現在、「アクセス制限」を無効にしたチームにアクセス権限を付与しようとしています。これは、任意のユーザーがこのチームに参加でき、このアクセストークンにアクセスできることを意味します。

      このメッセージは、すべてのユーザーがこのチームに参加でき、このアクセストークンの表示または読み取りができることを意味します。

    4. チームまたはユーザーを削除するには、チームまたはユーザー名の横にある削除アイコン( X )を選択します。

  3. Select Next to continue to the final step.

Configure an expiration date 🔗

トークンの有効期限を選択すると、トークンの作成が完了します。

  1. Expiration date ボックスで、トークンの有効期限が切れる日付を選択します。トークン作成日から18年を超える日付は指定できません。

  2. In the Expiration alert box, select from one of the following options:

    • Only admins can receive alert: Only admins receive an alert when the token is close to its expiration date.

    • Admins and users or teams with token permissions can receive alert:トークンの有効期限の日付が近づくと、管理者とトークン権限を持つすべてのユーザーにアラートが届きます。

  3. (オプション)Splunk Observability Cloudが有効期限切れアラートを送信するタイミングを設定します。たとえば、値を7 daysと設定すると、トークンの有効期限が切れる7日前に Splunk Observability Cloudがアラートを送信するということになります。

  4. Select Create to finish creating the new token.

アクセストークンのローテーション 🔗

You can rotate an access token using the access token menu or the Splunk Observability Cloud API. This creates a new secret for the token and deactivates the token’s previous secret. Optionally, you can provide a grace period before the previous token secret expires.

有効期限が切れたトークンをローテーションすることはできません。有効期限が切れる前にトークンをローテーションしなかった場合、新しいトークンを作成して置き換える必要があります。

注釈

トークンをローテーションするには、Splunk Observability Cloudの管理者である必要があります。

Rotate access tokens using the token menu 🔗

To rotate a token using the access token menu, follow these steps:

  1. In Splunk Observability Cloud, select Settings.

  2. Select Access tokens.

  3. アクセストークンメニューで、ローテーションするトークンを選択します。

  4. Select Rotate token.

  5. 新しいトークンシークレットの有効期限、および、(オプション)現在のトークンシークレットの猶予期間を入力します。

  6. Select Rotate.

トークンのローテーションが終了したら、猶予期間が終了する前に、新しいトークンシークレットを使ってOpenTelemetry Collectorの設定を更新してください。

Rotate access tokens using the Splunk Observability Cloud API 🔗

To rotate an access token with the API, use the POST /token/{name}/rotate endpoint in the Splunk Observability Cloud API. An API call to rotate a token looks like this:

curl -X  POST "https://api.{realm}.signalfx.com/v2/token/{name}/rotate?graceful={gracePeriod}&secondsUntilExpiry={secondsUntilExpiry}" \
   -H "Content-type: application/json" \
   -H "X-SF-TOKEN: <your-user-session-api-token-value>"

以下の手順に従ってください:

  1. realm フィールドに自分のSplunkレルムを入力します。

  2. Enter your API session token in the your-user-session-api-token-value field. To find or create an API session token, see Splunk Observability Cloudを使用したユーザー APIアクセストークンの取得と管理.

  3. name フィールドにローテーションさせたいトークンの名前を入力します。

  4. オプションで、gracePeriod フィールドに、猶予期間を秒単位で指定します。

  5. オプションで、トークンの有効期限が切れるまでの秒数を secondsUntilExpiry フィールドに入力します。この値には、0秒から5,676,000,000秒(18年)までの値を指定できます。未指定の場合、トークンは30日間有効になります。

  6. APIエンドポイントを呼び出してトークンをローテーションします。

例えば、以下のAPIコールは、myToken をローテンションし、以前のトークンシークレットの有効期限が切れるまでの猶予期間を604800秒(7日間)に設定するものです。

curl -X POST "https://api.us0.signalfx.com/v2/token/myToken/rotate?graceful=6048000" \
   -H "Content-type: application/json" \
   -H "X-SF-TOKEN: <123456abcd>"

トークンのローテーションが終了したら、猶予期間が終了する前に、新しいトークンシークレットを使ってOpenTelemetry Collectorの設定を更新してください。

このエンドポイントの詳細やリクエストと応答の例を確認するには、Splunk 開発者向けドキュメント を参照してください。

アクセストークンの名前を変更する 🔗

以下の手順で、トークンの名前を変更します:

  1. Select Edit Token from the token’s actions menu (⋮).

  2. トークンの新しい名前を入力します。

  3. OK を選択します。

Renaming a token does not affect the token’s secret.

注釈

クラウドのインテグレーション(AWS、GCP、または Azure) の場合、アクセストークンの名前を変更した後、APIを使用して新しいトークン名を選択する必要があります。AWSの場合は、UIで 新しいトークンを設定することもできます。

アクセストークンの無効化または有効化 🔗

注釈

トークンを削除することはできません。無効化のみ実行可能です。

To deactivate a token, select Deactivate from the token’s actions menu (⋮).

To activate a deactivated token, select Activate from the deactivated token’s actions menu (⋮).

有効なトークンまたは無効なトークンの検索は、アクセストークンページで Status フィルターを使用して実行できます。

Manage token limits 🔗

To change limits for your access tokens, including host and container limits, follow these steps:

  1. Select the token that you want to edit. This opens the token detail page.

  2. Select the token actions menu (⋮), and select Manage limits.

  3. Manage limits メニューで、新しいトークンの制限を追加します。

To learn more about token limits, see アクセストークンを使用したデータ取り込みの管理.

このページは 2024年11月06日 に最終更新されました。