Skip to content

Alibaba Cloud Authentication

DRACO authenticates to Alibaba Cloud with the AccessKey of a RAM user, either directly or to assume a read-only RAM role.

Warning

Do not use the AccessKey pair of the main Alibaba Cloud account for DRACO. Use a dedicated RAM user instead.

Choose The Right Method

DRACO accepts two methods in the provider form:

RAM User And AccessKey

This is the simplest setup.

Create The RAM User

  1. Open the RAM console.
  2. Go to Identities > Users.
  3. Click Create User.
  4. Enter a logon name and display name.
  5. In Access Configuration, select Permanent AccessKey.

Create a RAM user and enable Permanent AccessKey

  1. Save the generated AccessKey ID and AccessKey Secret immediately. Alibaba Cloud only shows the secret once.
  2. Grant the user the read permissions required for the Alibaba Cloud services you want DRACO to scan.

Grant permissions to the RAM user

Alibaba Cloud walkthroughs with current console screenshots:

Use this when:

  • you want scans to run with short-lived role credentials (the source user's AccessKey is still stored in DRACO),
  • you are scanning another Alibaba Cloud account, or
  • you are configuring Alibaba Cloud in DRACO and want to provide a Role ARN.

This flow has two parts:

  1. A source identity that can call sts:AssumeRole.
  2. A target RAM role that has the scan permissions.

Create The Source Identity

Create a RAM user with an AccessKey pair by following the steps in RAM User And AccessKey, or reuse an existing automation identity.

Create The Target Role

  1. Open the RAM console.
  2. Go to Identities > Roles.
  3. Click Create Role.
  4. Set Principal Type to Cloud Account.
  5. Choose:
  6. Current Account if the RAM user and the role are in the same account.
  7. Other Account if the RAM user belongs to a different Alibaba Cloud account.
  8. Give the role a name such as DracoAuditRole.
  9. Attach the scan permissions to the role.
  10. Copy the role ARN in the format acs:ram::<account-id>:role/<role-name>.

If you want to restrict the role so that only one RAM user or one RAM role can assume it, edit the trust policy accordingly.

Helpful references:

Allow The Source Identity To Assume The Role

The source RAM user must be able to call sts:AssumeRole.

The easiest starting point is to attach Alibaba Cloud's AliyunSTSAssumeRoleAccess policy to that RAM user. If you want tighter scope, attach a custom policy limited to the target role ARN.

Permissions Guidance

The exact minimum policy depends on the checks and services you enable.

If you are using the RAM console's Grant Permission screen, search for the system policy names below. Alibaba Cloud often uses product policy names that differ from the service name shown in DRACO.

System Policies In The RAM Console

DRACO use case Policy name in RAM console Notes
Source RAM user (role assumption) AliyunSTSAssumeRoleAccess Grants sts:AssumeRole so the source identity can assume the scan role.
RAM checks AliyunRAMReadOnlyAccess Covers RAM read APIs such as users, groups, policies, MFA devices, and account alias.
ECS checks AliyunECSReadOnlyAccess Read-only ECS access.
VPC checks AliyunVPCReadOnlyAccess Read-only VPC access.
OSS checks AliyunOSSReadOnlyAccess Read-only OSS access.
ActionTrail checks AliyunActionTrailReadOnlyAccess Read-only ActionTrail access.
SLS checks AliyunLogReadOnlyAccess In the RAM console, Simple Log Service appears as Log.
RDS checks AliyunRDSReadOnlyAccess Read-only RDS access.
ACK / Container Service checks AliyunCSReadOnlyAccess In the RAM console, ACK permissions appear under CS.
Security Center checks AliyunYundunSASReadOnlyAccess In the RAM console, Security Center appears under Yundun SAS.

For a broad Alibaba Cloud scan, the identity used by DRACO usually needs read access to the services DRACO currently audits, including:

  • RAM
  • ECS
  • VPC
  • OSS
  • ActionTrail
  • Simple Log Service (SLS)
  • RDS
  • Container Service / ACK
  • Security Center

Use the following setup as a practical starting point:

  • If you use static AccessKeys, attach the read-only policies above directly to the RAM user used by DRACO.
  • If you use RAM role assumption, attach AliyunSTSAssumeRoleAccess to the source RAM user and attach the read-only policies above to the target scan role.

If you prefer a tighter custom policy instead of system policies, the current provider relies on read APIs such as:

  • ram:Get*, ram:List*
  • ecs:Describe*
  • vpc:Describe*
  • oss:Get*, oss:List*
  • actiontrail:Describe*
  • log:Get*, log:List*, log:Query*
  • rds:Describe*
  • cs:Get*, cs:List*, cs:Describe*
  • yundun-sas:Get*, yundun-sas:Describe*, yundun-sas:List*

Note

If a service is denied, DRACO can still start, but checks for that service may fail or return incomplete results.