Connect an Alibaba Cloud Account

Connect an individual Alibaba Cloud account to gain visibility into its resources, configurations, and security posture.

Note: To connect multiple accounts without adding them individually, see Connect an Alibaba Cloud Organization.

Prerequisites

Before you begin:

  • Grant sufficient permissions to the Alibaba Cloud account that will create roles, users, access keys, and ROS stacks.
  • Install and configure the Aliyun CLI with valid credentials before running the ROS deployment script.
  • Terraform-specific:
    • Ensure you have Terraform CLI v0.13+ installed.
    • Ensure terraform init can download and install Alibaba Cloud provider v1.252+ without conflicting with your existing configurations.
    • Ensure Terraform is run where the access-key file can be handled securely.
  1. In the Tenable One Cloud Exposure Console, navigate to Settings > Integrations and click + Add Integration.
  2. In the Integrations Library, click Alibaba Cloud Account. The Alibaba Cloud Account wizard opens.
  3. In the wizard:
    1. Enter a name for the integration.
    2. Select the Alibaba Cloud environment type that matches your organization.
      • Aliyun — Accounts in Alibaba Cloud China regions.
      • International — Accounts in Alibaba Cloud international regions.
    3. Under Capabilities, select the capabilities to enable. Your selection determines the required permissions and dynamically updates the deployment script. For more information, see Alibaba Cloud Required Permissions.

      Note: Tenable recommends enabling all available capabilities to provide the most comprehensive security coverage. Enabling them now ensures the deployment script grants the required permissions from the start. If you enable them later, you will need to redeploy the script to update the permissions granted to Tenable.
      • Monitoring (read-only) — Selected by default. Gain full visibility for all cloud assets, including information about permissions, compartment usage, data and security configurations.
      • Data Resources Scanning (Data Protection) — Scan and classify cloud resources.
      • Workload Protection — Scan virtual machine instances and container image registries for vulnerabilities and misconfigurations.
    4. Under Deployment, select one of the following deployment options:

      • ROS. Script-based deployment. Run the script displayed in the wizard in your Alibaba Cloud environment using the Aliyun CLI. Learn more
      • Terraform. Module-based deployment. See Prerequisites before deploying.
        1. Copy the first invocation displayed in the Cloud Exposure wizard, add it to your Terraform configuration, and then run terraform apply. The module creates the RAM user and access key.
        2. Retrieve the user ARN from the Terraform output and enter it in the User ARN field.
        3. Copy the second invocation displayed in the Cloud Exposure wizard, add it to your Terraform member account configuration, and then run terraform apply. The module creates the RAM role and grants Tenable the permissions to connect and scan the environment.
      • Manual. Manually, via the Alibaba Cloud RAM console. See Manually Deploy an Alibaba Cloud Account for step-by-step instructions.
      Note: When you enable Workload Protection, the ROS script and the Terraform module also create the AliyunECSDiskEncryptDefaultRole and AliyunECSShareEncryptSnapshotDefaultRole roles to scan encrypted disks. If either role already exists in your account, the deployment fails. To use the existing role, see If a Role Already Exists. For manual deployment, you create these roles yourself. See Create Roles for Encrypted Disk Scanning.
      Caution: When you finish manual deployment, return to the wizard to complete Post Deployment before clicking Finish.
    5. Under Post deployment, enter the following values.

      Note: ROS: Copy the values from the script output after the stack creation completes. Terraform: Retrieve the values from the Terraform outputs. Manual: See Manually Deploy an Alibaba Cloud Account for how to retrieve these values.
      • Role ARN — The ARN of the RAM role created in your account.
      • Access Key ID — The ID of the access key created for the Tenable RAM user. For Terraform, retrieve the ID from the access-key file saved by Terraform.
      • Access Key Secret — The secret of the access key created for the Tenable RAM user. For Terraform, retrieve the ID from the access-key file saved by Terraform.
  4. Click Finish.
Note: It may take a few minutes for permission changes to propagate in your Alibaba Cloud account. If you see an error when clicking Finish, wait a few minutes and try again.

Next steps:

After your account is connected successfully, it appears in Settings > Organization > Accounts > Alibaba Cloud. From here, you can manage your account and view account details to see, for example, which features are enabled and whether the required permissions were granted.

Data about account resources will start to appear in Cloud Exposure. The time it takes for all data to appear varies depending on the size of your cloud environment.

Manually Deploy an Alibaba Cloud Account

Note: When you finish manual deployment, return to the wizard to complete the Post Deployment section.

As an alternative to the ROS script, you can manually deploy your Alibaba Cloud account via the Alibaba Cloud RAM console. These procedures apply if you selected Manual for the deployment type when connecting your Alibaba Cloud account.

  1. Create a RAM User and Access Key
  2. Create a RAM Role for Tenable
  3. Create Custom Policies
  4. Assign Policies
  5. Create Roles for Encrypted Disk Scanning (if you enabled Workload Protection)

Create a RAM User and Access Key

Create a dedicated RAM user and generate the access key that Tenable uses to authenticate. Complete this step first. You will need the user ARN when creating the RAM role.

  1. In the RAM console, navigate to Identities > Users.
  2. Click Create User.
  3. For User Login Name, enter tenable-user.
  4. In the Access Configuration section, select Permanent AccessKey.
  5. Confirm that it is necessary to create an AccessKey.
  6. Click OK.
  7. Copy and save the AccessKey ID and AccessKey Secret shown on the confirmation page. The secret cannot be retrieved later. You will enter both values in the Tenable wizard's Post Deployment section.
  8. On the Users page, click tenable-user to open its details.
  9. Select the Permissions tab and click Grant Permission.
  10. For Resource Scope, select Account.
  11. Select the AliyunSTSAssumeRoleAccess policy, and then click OK.

Create a RAM Role for Tenable

Create a dedicated RAM role that Tenable uses to access and monitor your account. The role's trust policy grants tenable-user permission to assume it.

Before you begin, locate your Alibaba Cloud account ID. You can find it in the upper-right corner of the Alibaba Cloud console.

  1. In the RAM console, navigate to Identities > Roles.
  2. Click Create Role.
  3. For Principal Type, select Cloud Account.
  4. Click Switch to Policy Editor.
  5. Under Cloud Account, click Edit.
  6. For Identity Type, select RAM user.
  7. For User Name, enter tenable-user.
  8. Click OK.
  9. For Action, select sts:AssumeRole.
  10. Click OK.
  11. For Role Name, enter tenable-role and click OK.
  12. On the Roles page, click tenable-role to open its details.
  13. Copy and save the ARN. You will enter this value in the Tenable wizard's Post Deployment section as the Main Account Role ARN.

Create Custom Policies

Create a custom RAM policy for each capability you selected in the wizard. For the full list of required permissions by capability, see Alibaba Cloud Required Permissions.

  1. In the RAM console, navigate to Permissions > Policies.
  2. Click Create Policy, and then select JSON Editor.
  3. Paste the policy from Alibaba Cloud Required Permissions in the JSON editor to create the Monitoring (read-only) policy.
  4. Click OK.
  5. For Policy Name, enter tenable-monitoring-policy and click OK.
  6. (Optional) Return to the Policies page to create the Workload protection policy.
    1. Paste the policy from Alibaba Cloud Required Permissions in the JSON editor.
    2. Click OK.
    3. For Policy Name, enter tenable-workload-policy and click OK.
  7. (Optional) Return to the Policies page to create the Data Resources Scanning (Data Protection) policy.
    1. Paste the policy from Alibaba Cloud Required Permissions in the JSON editor.
    2. Click OK.
    3. For Policy Name, enter tenable-data-scanning-policy and click OK.

Assign Policies

Assign the policies you created to tenable-role.

  1. In the RAM console, navigate to Identities > Roles.
  2. Open tenable-role and click Grant Permission.
  3. In the Policy section, select the policies you created earlier.
  4. Click OK and then Close.

Create Roles for Encrypted Disk Scanning

If you enabled Workload Protection, create the two RAM roles that Tenable uses to scan disks, and then attach the encrypted disk KMS policy to both. Alibaba Cloud looks for these roles by name, so enter the names exactly as shown.

Note: If AliyunECSDiskEncryptDefaultRole or AliyunECSShareEncryptSnapshotDefaultRole already exists in your account, do not create it again. Create the policy in the first procedure below, and then complete steps 3 and 4 of If a Role Already Exists for that role.

To create the encrypted disk KMS policy:

  1. In the RAM console, navigate to Permissions > Policies.
  2. Click Create Policy, and then select JSON Editor.
  3. Paste the Encrypted Disk KMS Policy in the JSON editor.
  4. Replace <AccountId> with the ID of your account, and replace <OutpostAccountId> with the value of the OutpostAccountId parameter in the deployment script displayed in the wizard.
  5. Click OK.
  6. For Policy Name, enter tenable-virtual-machine-scanning-encrypted-disk and click OK.

To create the roles:

Complete the following steps once for each role. Use the trust policy that matches the role from Trust Policies:

  • AliyunECSDiskEncryptDefaultRole — Use the trust policy for AliyunECSDiskEncryptDefaultRole.
  • AliyunECSShareEncryptSnapshotDefaultRole — Use the trust policy for AliyunECSShareEncryptSnapshotDefaultRole. Replace <OutpostAccountId> with the same value you used in the KMS policy.
  1. In the RAM console, navigate to Identities > Roles.
  2. Click Create Role.
  3. Click Switch to Policy Editor.
  4. Paste the trust policy in the JSON editor, and then click OK.
  5. For Role Name, enter the role name and click OK.
  6. On the Roles page, click the role to open its details.
  7. On the Permissions tab, click Grant Permission.
  8. For Resource Scope, select Account.
  9. Select the tenable-virtual-machine-scanning-encrypted-disk policy, and then click OK.
  10. Click Close.