Open API SA Authorization

The management of Open API’s access permissions to TSDB data is achieved through Service Account and permission policies.

This tutorial will guide you to use Service Account to access TSDB data through Open API. The administrator needs to create a permission policy, then bind the permission policy to the asset tree, and finally apply the permission policy to a certain Service Account. You can read and write data and control assets through the permissions of the Service Account.

Create Asset Tree

  1. Log in to the EnOS Management Console and select Asset Trees from the left navigation bar.

  2. Click the + button in the upper left corner to create a new asset tree.

  3. In the Create Asset Tree pop-out box, enter the asset tree name and click Next.

  4. Select Bind to Existing Asset, and click Next.

  5. Select the asset to be associated and click Confirm to add the device to the asset tree.

    ../_images/asset_tree_associate_en.png

Create Permission Policy

  1. Log in to the EnOS Management Console and select Identity and Access Management > Policy from the left navigation bar.

  2. Click New Policy.

  3. On the Basic Information page, fill in the basic information of the policy and click Next.

    ../_images/new_auth_policy_1_en.png
  4. Click New Service > Asset inn the upper right corner, tick the following:

    • Resouce:Tick Assign, and select the previously created asset tree.
    • Action:Grant corresponding read, write and control permissions as needed.
    ../_images/new_auth_policy_2_en.png
  5. Click Save to create the permission policy.

SA Authorization

  1. Log in to the EnOS Management Console and select Identity and Access Management > Service Account from the left navigation bar.

  2. Click the Authorize auth_icon at the end of the service account that requires authorization.

  3. Click Assign Policies, in the Authorize pop-out box, Select the permission policy to be added.

    ../_images/sa_auth_en.png
  4. Click Save to complete SA authorization of Open API.