RAM user and role authorization guide for observability groups

Updated at:

This topic describes how to use custom RAM permission policies to let RAM users or roles access and manage observability groups.

Note

You can use RAM policies to control the access scope by region and observability group. The group list returns results based on the caller's permission to view group details. Querying members and updating, deleting, following, and unfollowing groups each require separate authorization.

Authorization workflow and identities

Authorization workflow: An administrator creates a custom RAM policy → grants the policy to RAM users, user groups, or roles → uses the authorized identity to verify the permissions.

Perform this operation as the Alibaba Cloud account or as an administrator who has permissions to create and grant RAM policies. Regular RAM users must contact an administrator for authorization.

Scenario

Authorized entity

Description

A person accesses the console or calls API operations

RAM user or RAM user group

When multiple people need access, manage them together through a user group

A program calls API operations by using STS

The RAM role that actually calls the API operations

You must also configure the role trust policy and the caller's permission to assume the role

This topic describes the permissions for callers to access observability groups. When CloudMonitor accesses your cloud resources through the service-linked role (SLR) AliyunServiceRoleForCloudMonitor, you must complete the SLR authorization separately.

Configure the policy in the console

  1. Log on to the RAM console.

  2. Go to Permissions > Policies, and create a custom policy.

  3. Select the JSON editor, paste a policy template from this topic, and replace the region, account UID, and GroupId.

  4. Save the policy. For example, name it ObserveGroupReadOnly.

  5. Attach the custom policy to the target RAM user, user group, or role. The templates in this topic can be granted at the account level, and the Resource field in the policy limits the access scope.

  6. Use the authorized identity to access observability groups or call API operations again to verify the permissions.

Official documentation:

Policy template parameters

Parameter

Description

Example

Region

The region where the observability group resides. It must match the region of the API request.

cn-hangzhou

<account-uid>

The UID of the Alibaba Cloud account that owns the resource. This is not the RAM user ID.

Replace with the actual account UID

<GroupId>

The ID of the observability group to authorize

Replace with the actual GroupId

Replace all placeholders in the template before you save it. The resource ARN format of an observability group is:

acs:cms:<region>:<account-uid>:observegroup/<GroupId>

The ARN does not contain a WorkspaceId. Do not write it as observegroup/<WorkspaceId>/<GroupId>.

Policy templates

Read-only access to all observability groups in a region

Allows listing observability groups, viewing details and members, and querying the supported resource types for the specified account and region.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "cms:ListObserveGroups",
        "cms:GetObserveGroup",
        "cms:ListObserveGroupSupportedEntityTypes",
        "cms:ListObserveGroupInstances"
      ],
      "Resource": "acs:cms:cn-hangzhou:<account-uid>:observegroup/*"
    }
  ]
}

Management access to observability groups in a region

Allows listing, creating, updating, deleting, following, and unfollowing observability groups for the specified account and region. This is a complete policy and can be used on its own.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "cms:ListObserveGroups",
        "cms:GetObserveGroup",
        "cms:ListObserveGroupSupportedEntityTypes",
        "cms:ListObserveGroupInstances",
        "cms:UpdateObserveGroup",
        "cms:DeleteObserveGroup",
        "cms:FollowObserveGroup",
        "cms:UnfollowObserveGroup"
      ],
      "Resource": "acs:cms:cn-hangzhou:<account-uid>:observegroup/*"
    },
    {
      "Effect": "Allow",
      "Action": "cms:CreateObserveGroup",
      "Resource": "acs:cms:cn-hangzhou:<account-uid>:*"
    }
  ]
}

View and update specified groups only

Allows calling the get and update operations for specified groups. It does not include permissions to create, delete, list, query members, or follow groups. If you only need read access, remove cms:UpdateObserveGroup.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "cms:GetObserveGroup",
        "cms:UpdateObserveGroup"
      ],
      "Resource": "acs:cms:cn-hangzhou:<account-uid>:observegroup/<GroupId>"
    }
  ]
}

This template applies when you call the group detail and update API operations directly. To browse the group list or view members in the console, add the corresponding permissions. For more information, see "Browse lists, view members, and follow groups in the console".

Actions and resource authorization scope

Each resource suffix below must be prefixed with acs:cms:<region>:<account-uid>:.

Operation

RAM action

Resource suffix

View group details

cms:GetObserveGroup

observegroup/<GroupId>

Update a group

cms:UpdateObserveGroup

observegroup/<GroupId>

Delete a group

cms:DeleteObserveGroup

observegroup/<GroupId>

List groups

cms:ListObserveGroups

observegroup/*

Query supported resource types

cms:ListObserveGroupSupportedEntityTypes

observegroup/*

Query group members

cms:ListObserveGroupInstances

observegroup/<GroupId>

Create a group

cms:CreateObserveGroup

*

Follow a group

cms:FollowObserveGroup

observegroup/<GroupId>

Unfollow a group

cms:UnfollowObserveGroup

observegroup/<GroupId>

Usage notes

  • The get, update, delete, member query, follow, and unfollow API operations support specifying a resource by GroupId.

  • ListObserveGroupInstances is authorized against the observegroup/<GroupId> resource. You can restrict member queries to specified groups.

  • Listing groups requires the cms:ListObserveGroups permission on the observegroup/* resource. The list returns only the groups for which the caller has the cms:GetObserveGroup permission, and the total count and pagination are based on the groups that the caller can view. Granting only the list permission does not grant permission to view the details of all groups.

  • The resource ARN does not contain a WorkspaceId. To restrict access to the groups in a workspace, enumerate the corresponding GroupIds in the policy, and update the policy after new groups are added.

  • A console page may use multiple API operations. If an access-denied error occurs, check the action in the error message and grant permissions based on the actual usage.

Example: one workspace, three teams with separate authorization

Scenario and division of responsibilities

Assume that the same Alibaba Cloud account has a workspace ws-observe-prod in the China (Hangzhou) region, containing the following observability groups. The account UID, WorkspaceId, GroupId, and RAM user names are examples. Replace them with actual values when you use them.

Workspace

Team

Group name

GroupId

ws-observe-prod

Development

Development application

og-dev-app

ws-observe-prod

Development

Development test

og-dev-test

ws-observe-prod

Operations

Infrastructure

og-ops-infra

ws-observe-prod

LLM

Model training

og-llm-train

ws-observe-prod

LLM

Model inference

og-llm-infer

Add users to RAM user groups by team, and attach policies to the user groups:

RAM user group

Example RAM user

Policy name

Permissions in this example

ObserveGroupDevelopers

dev-zhang, dev-li

ObserveGroupDevEditor

View and update the two Development groups

ObserveGroupOperators

ops-wang

ObserveGroupOpsMaintainer

View and update all five groups and query their members; the list shows only the groups that the caller can view

ObserveGroupLLM

llm-chen, llm-zhao

ObserveGroupLLMEditor

View and update the two LLM team groups

This example uses a division in which business teams maintain their own groups and the Operations team maintains groups across teams. If the Operations team should also maintain only its own groups, narrow the permissions as described in "Common variants and staffing changes".

Note

This example limits the group access scope of each team by enumerating GroupIds. A WorkspaceId is a query condition, not a RAM resource authorization boundary. Observability group permissions do not include permission to query the associated metrics, traces, or logs. To access this data, configure the corresponding permissions separately.

Development team: maintain its own two groups

Create the ObserveGroupDevEditor policy and attach it to the ObserveGroupDevelopers user group.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "cms:GetObserveGroup",
        "cms:UpdateObserveGroup"
      ],
      "Resource": [
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-dev-app",
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-dev-test"
      ]
    }
  ]
}

When no other policy grants additional permissions, dev-zhang and dev-li can view and update the Development groups. They cannot view or update the details of the Operations or LLM groups, and they cannot delete any group. This policy does not grant list or member query permissions. To browse lists and view members, add the permissions described in "Browse lists, view members, and follow groups in the console".

LLM team: maintain the training and inference groups

Create the ObserveGroupLLMEditor policy and attach it to the ObserveGroupLLM user group.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "cms:GetObserveGroup",
        "cms:UpdateObserveGroup"
      ],
      "Resource": [
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-llm-train",
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-llm-infer"
      ]
    }
  ]
}

When no other policy grants additional permissions, llm-chen and llm-zhao can view and update the Model training and Model inference groups. They cannot view or update the details of the Development or Operations groups. This policy also does not grant list or member query permissions.

Operations team: maintain specified groups across teams

Create the ObserveGroupOpsMaintainer policy and attach it to the ObserveGroupOperators user group. The get, update, and member query permissions are limited to the five groups in this example. The list and supported resource types queries use the observegroup/* resource.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "cms:GetObserveGroup",
        "cms:UpdateObserveGroup",
        "cms:ListObserveGroupInstances"
      ],
      "Resource": [
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-dev-app",
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-dev-test",
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-ops-infra",
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-llm-train",
        "acs:cms:cn-hangzhou:<account-uid>:observegroup/og-llm-infer"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "cms:ListObserveGroups",
        "cms:ListObserveGroupSupportedEntityTypes"
      ],
      "Resource": "acs:cms:cn-hangzhou:<account-uid>:observegroup/*"
    }
  ]
}

This policy allows querying the members of the five groups above, and the group list returns only these five groups. It does not grant create, delete, follow, or unfollow permissions. The WorkspaceId in a request filters the query scope and does not replace the resource ARN authorization.

If the Operations team needs to delete these five groups, add cms:DeleteObserveGroup to the actions of the first statement. If they need to create groups, you must additionally grant cms:CreateObserveGroup and acs:cms:cn-hangzhou:<account-uid>:*. You cannot use the ARN in this example to limit create permission to ws-observe-prod.

Common variants and staffing changes

Requirement

Configuration

Boundary notes

The Operations team maintains only the Infrastructure group

Narrow the Resource of the first statement in the Operations policy to the ARN of og-ops-infra

Member query, get, and update permissions use the same group ARNs; the list query uses the observegroup/* resource, and returned results are filtered by the cms:GetObserveGroup permission.

A team can only view, not update

Remove cms:UpdateObserveGroup from the policy of that team

Only the details permission for the listed groups remains

A developer also maintains the LLM groups

Add the RAM user to both the Development and LLM user groups

Allow permissions from both groups add up; explicit deny statements and other restrictions still apply

A new Development group is added

Add the ARN of the new GroupId to the Development policy; if the Operations team also maintains the group, add it to the Operations policy too

Explicit enumeration does not automatically include the new group

A person transfers to another team or leaves

Remove the user from the original user group, and check directly attached policies, other user groups, and assumable roles

Prevent other authorization paths from retaining permissions

The team also needs to query associated logs, metrics, or traces

Grant data query permissions for the corresponding products separately

Observability group permissions do not automatically grant access to associated data

Browse lists, view members, and follow groups in the console

The templates for the Development team and the LLM team contain only the get and update permissions. Add the following permissions to the original policy based on your usage requirements:

Requirement

Action to add

Resource scope

Browse the group list

cms:ListObserveGroups

acs:cms:cn-hangzhou:<account-uid>:observegroup/*

Query supported resource types

cms:ListObserveGroupSupportedEntityTypes

acs:cms:cn-hangzhou:<account-uid>:observegroup/*

View group members

cms:ListObserveGroupInstances

The ARN of the specific group in your team

Follow a group

cms:FollowObserveGroup

The ARN of the specific group in your team

Unfollow a group

cms:UnfollowObserveGroup

The ARN of the specific group in your team

You can put the list and supported resource types queries in a separate statement. You can add the member query, follow, and unfollow actions to the statement in the original policy that enumerates the GroupIds of your team. When you query the list, only the groups for which you have the cms:GetObserveGroup permission are returned.

For example, after you add the list and member query permissions for the Development team, the users can see the Development application and Development test groups in the list and view their members. Requests to view the details and members of the Operations or LLM groups are denied. The matrix in "Verification matrix for this example" corresponds to the original templates before these permissions are added.

Verification matrix for this example

The expectations below assume that the policies in this example are the only relevant Allow permissions, that no other additional permissions are granted, and that no explicit deny statements or other permission restrictions apply.

Operation

Development RAM user

Operations RAM user

LLM RAM user

View and update og-dev-app / og-dev-test

Allowed

Allowed

Denied

View and update og-ops-infra

Denied

Allowed

Denied

View and update og-llm-train / og-llm-infer

Denied

Allowed

Allowed

List groups

Not authorized

Returns only the five groups above

Not authorized

Query group members

Not authorized

Allowed only for the five groups above; other GroupIds are denied

Not authorized

Create, delete, follow, or unfollow groups

Not authorized

Not authorized

Not authorized

View and update a sixth group that is added later

Not authorized

Not authorized

Not authorized

During verification, call the detail or member query operations by using the GroupId of another team, and confirm that the requests are denied. Also check that the list does not return unauthorized groups. For the Operations account, also verify that the GroupIds that are not enumerated cannot be accessed.

Permission verification

Verify the permissions with the target RAM user or the RAM role that you actually assume. Do not use an administrator identity instead.

Scenario

What to verify

Expected result

Read-only policy

List groups, view details, and query members

Succeeds within the authorized scope

Read-only policy

Create, update, and delete groups

Denied when no other policy grants these permissions

Management policy

Verify management operations on a test group

Succeeds within the authorized scope

Single-group policy

View and update the specified GroupId

Succeeds

Single-group policy

View and update another GroupId

Denied when no other policy grants these permissions

Region restriction

Access a group in a region that is not authorized

Denied when no other policy grants these permissions

When you verify denied scenarios, check whether the identity obtains additional permissions through other policies, user groups, or roles.

Troubleshoot access-denied errors

  1. Check the actual identity: Confirm that the request uses the target RAM user or the expected STS role.

  2. Check the failed action: Check the AuthAction in the error message, and confirm that the policy contains the corresponding permission.

  3. Check the resource: Check the region, the UID of the account that owns the resource, the GroupId, and the ARN format.

  4. Check the policy attachment target: When you use STS, confirm that the permissions are granted to the RAM role that is actually assumed.

  5. Check for explicit deny statements and other permission restrictions: Rule out restrictions on the request from other policies.

  6. Preserve the error information: If access is still denied, record the API name, error code, and RequestId, and submit a ticket for support. Do not submit AccessKey Secret or STS Token.