Alibaba Cloud Required Permissions
The permissions that Tenable needs depend on the capabilities that you enable. The Monitoring, Data Protection, and Workload Protection policies are attached to the Tenable RAM role (tenable-role by default). Encrypted disk scanning uses a separate policy that is attached to two other RAM roles.
| Feature | Alibaba RAM Permissions | Notes |
|---|---|---|
| Monitoring (read-only) |
Custom policy with the following permissions:
|
Always applied. When connecting an Alibaba Cloud organization, these permissions must be granted at the organization level. See Monitoring Policy below for the exact policy JSON. |
| Data Resources Scanning (Data Protection) |
Custom policy with the following permissions:
|
See Data Protection for more information, and Data Protection Policy below for the exact policy JSON. |
| Workload Protection |
Custom policy with the following permissions:
|
Using this feature requires the Standard/Enterprise license. Several of the snapshot and resource-sharing permissions above only apply to resources tagged for Tenable's workload analysis — see Workload Protection Policy below for the exact policy JSON, including those tag conditions. See Alibaba Cloud: Grant Workload Protection Permissions for the procedure to grant this policy. |
| Workload Protection: Encrypted disk scanning |
Custom policy attached to two RAM roles with the following permissions:
|
Required to scan ECS instances with disks encrypted by Alibaba Cloud KMS. The ROS and Terraform scripts create the roles and attach the policy when Workload Protection is enabled. See Encrypted Disk Scanning below for the roles, trust policies, and exact policy JSON. |
Monitoring Policy
JSON
{
"Statement": [
{
"Action": [
"cr:Get*",
"cr:List*",
"cr:PullRepository",
"cs:Describe*",
"cs:GetClusters",
"ecs:Describe*",
"ram:GenerateCredentialReport",
"kms:Describe*",
"kms:GetKeyPolicy",
"kms:GetKmsInstance",
"kms:GetSecretPolicy",
"kms:List*",
"oss:GetBucket*",
"oss:ListBuckets",
"ram:Get*",
"ram:List*",
"resourcecenter:ListResourceTypes",
"resourcecenter:SearchResources",
"resourcemanager:Get*",
"resourcemanager:List*",
"tag:ListTagResources"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
],
"Version": "1"
}
Data Protection Policy
JSON
{
"Version": "1",
"Statement": [
{
"Action": [
"kms:Decrypt",
"oss:GetObject",
"oss:ListObjects"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
Workload Protection Policy
JSON
{
"Statement": [
{
"Action": [
"ecs:CopySnapshot",
"ecs:CreateSnapshot",
"ecs:TagResources"
],
"Condition": {
"StringEquals": {
"acs:RequestTag/TenableContext": [
"WorkloadAnalysis"
]
}
},
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"ecs:CopySnapshot",
"ecs:DeleteSnapshot"
],
"Condition": {
"StringEquals": {
"acs:ResourceTag/TenableContext": [
"WorkloadAnalysis"
]
}
},
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"resourcesharing:CreateResourceShare",
"resourcesharing:TagResources"
],
"Condition": {
"StringEquals": {
"acs:RequestTag/TenableContext": [
"WorkloadAnalysis"
]
}
},
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"resourcesharing:DeleteResourceShare"
],
"Condition": {
"StringEquals": {
"acs:ResourceTag/TenableContext": [
"WorkloadAnalysis"
]
}
},
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"resourcesharing:AssociateResourceShare",
"resourcesharing:DisassociateResourceShare",
"resourcesharing:ListResourceShareAssociations",
"resourcesharing:ListResourceShares"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
],
"Version": "1"
}
Encrypted Disk Scanning
To scan ECS instances with encrypted disks, Tenable needs two RAM roles in your account. Alibaba Cloud looks for these roles by name, so you cannot rename them. When Workload Protection is enabled, the ROS and Terraform scripts create both roles and attach the encrypted disk KMS policy to them.
| Role | Trusted By | Policy |
|---|---|---|
| AliyunECSDiskEncryptDefaultRole | ecs.aliyuncs.com | Encrypted disk KMS policy |
| AliyunECSShareEncryptSnapshotDefaultRole | ecs.aliyuncs.com and <OutpostAccountId>@ecs.aliyuncs.com | Encrypted disk KMS policy |
In the policies below, <AccountId> is the ID of the account you are connecting. <OutpostAccountId> is the ID of the account that scans your instances. Copy it from the script in the Tenable One Cloud Exposure wizard.
Trust Policies
Trust policy for AliyunECSDiskEncryptDefaultRole:
JSON
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"ecs.aliyuncs.com"
]
}
}
],
"Version": "1"
}
Trust policy for AliyunECSShareEncryptSnapshotDefaultRole:
JSON
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"ecs.aliyuncs.com",
"<OutpostAccountId>@ecs.aliyuncs.com"
]
}
}
],
"Version": "1"
}
Encrypted Disk KMS Policy
Attach this policy to the AliyunECSDiskEncryptDefaultRole and AliyunECSShareEncryptSnapshotDefaultRole roles.
JSON
{
"Statement": [
{
"Action": ["kms:List*"],
"Effect": "Allow",
"Resource": [
"acs:kms:*:<AccountId>:key",
"acs:kms:*:<OutpostAccountId>:key"
]
},
{
"Action": [
"kms:Decrypt",
"kms:DescribeKey",
"kms:Encrypt",
"kms:GenerateDataKey",
"kms:TagResource",
"kms:UntagResource"
],
"Effect": "Allow",
"Resource": [
"acs:kms:*:<AccountId>:key/*",
"acs:kms:*:<OutpostAccountId>:key/*"
]
}
],
"Version": "1"
}
If a Role Already Exists
If AliyunECSDiskEncryptDefaultRole or AliyunECSShareEncryptSnapshotDefaultRole already exists in your account, the deployment fails because Alibaba Cloud cannot create a second role with the same name. This can happen if you already use ECS disk encryption or share encrypted snapshots. To use the existing role, turn off creation of that role in the deployment script, and then configure the role in the RAM console.
Each role has its own parameter in the deployment script.
| Role | ROS Parameter | Terraform Input |
|---|---|---|
| AliyunECSDiskEncryptDefaultRole | VirtualMachineScanningCreateDiskEncryptRole | virtual_machine_scanning_create_disk_encrypt_role |
| AliyunECSShareEncryptSnapshotDefaultRole | VirtualMachineScanningCreateShareEncryptSnapshotRole | virtual_machine_scanning_create_share_encrypt_snapshot_role |
To use an existing role:
- In the integration wizard, under Deployment, change the value to false for the parameter for each existing role.
-
Create the encrypted disk KMS policy.
- In the RAM console, navigate to Permissions > Policies.
- Click Create Policy, and then select JSON Editor.
- Paste the Encrypted Disk KMS Policy in the JSON editor.
- Replace <AccountId> with the ID of your account, and replace <OutpostAccountId> with the value of the OutpostAccountId parameter in the deployment script.
- Click OK.
- For Policy Name, enter tenable-virtual-machine-scanning-encrypted-disk and click OK.
-
Attach the policy to each existing role.
- In the RAM console, navigate to Identities > Roles.
- Click the existing role to open its details.
- On the Permissions tab, click Grant Permission.
- For Resource Scope, select Account.
- Select the encrypted disk KMS policy, and then click OK.
-
Update the trust policy of each existing role.
- On the role details page, select the Trust Policy tab and click Edit Trust Policy.
-
In the Service list, make sure that the role trusts the required principals. Do not remove entries that are already in the list.
- AliyunECSDiskEncryptDefaultRole: ecs.aliyuncs.com
- AliyunECSShareEncryptSnapshotDefaultRole: ecs.aliyuncs.com and <OutpostAccountId>@ecs.aliyuncs.com
- Click OK.
-
Return to the integration wizard in the Cloud Exposure Console to complete the deployment.
- Copy the ROS script and run it, or add the module call to your Terraform configuration and run terraform apply.
- Complete the remaining steps in the wizard, and then click Finish.