認証

Version 26.2.9619


認証

Version 26.2.9619


Each configured CData Arc user has the option to authenticate to the Admin API with either an authtoken or OAuth 2.0. For more information about configuring users and user roles, see User Management and Roles.

Using Authtokens

認証トークンは、いくつかの方法でAPI リクエスト内で使用できます。

  • Include an x-cdata-authtoken header in the HTTP request with the value set to an appropriate user’s authtoken
  • ユーザーおよび認証トークンを、HTTP Basic 認証のユーザー名 / パスワードの組み合わせとして扱います。
  • クエリパラメータとしてリクエストURL に認証トークンを含めます。

この例では、認証方式として認証トークンヘッダー(x-cdata-authtoken)を使用します。この方式を使用するには:

  1. ナビゲーションバーの設定アイコンをクリックします。

  2. ユーザーを追加をクリックして新しいユーザーを追加するか、既存のユーザーの名前のリンクをクリックしてユーザーを編集します。

  3. API アクセスタブをクリックし、API アクセスチェックボックスをオンにして認証トークンを表示します。ダイアログは再表示されないため、トークンは安全な場所にコピーしてください。認証トークンを紛失または削除した場合は、新しいトークンを作成する必要があります。

  4. 保存をクリックします。

To include the authtoken in the request URL, follow these steps:

  1. Open the Settings page.

  2. Select the Admin API tab.

  3. In the Other Settings section, select Allow Authtoken in URL.

The syntax of the authtoken query parameter is @authtoken=myAuthTokenValue.

Using OAuth 2.0

OAuth 2.0 provides a structured authentication flow for clients that need to manage token lifecycles or integrate with external applications.

To enable OAuth 2.0, follow these steps:

  1. Click the Settings icon on the navbar.

  2. Click Add User to add a new user or click the link on an existing user’s name to edit a user.

  3. Click the API Access tab, then check Enable OAuth Access. Complete the following fields:

  • Grant Type The OAuth 2.0 grant type that determines how the client application obtains an access token. Client Credentials is currently the only option.
  • Client Id The system-generated client Id token.
  • Client Secret The system-generated client secret. Make sure to copy it to a safe location before saving the user, because it is not shown again.
  • Access URL The endpoint URL used by the client application to request an access token using the configured credentials.