RAM user and role authorization guide for observability groups
This topic describes how to use custom RAM permission policies to let RAM users or roles access and manage observability groups.
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
Log on to the RAM console.
Go to , and create a custom policy.
Select the JSON editor, paste a policy template from this topic, and replace the region, account UID, and GroupId.
Save the policy. For example, name it
ObserveGroupReadOnly.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
Resourcefield in the policy limits the access scope.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. |
|
| The UID of the Alibaba Cloud account that owns the resource. This is not the RAM user ID. | Replace with the actual account UID |
| 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 |
|
|
Update a group |
|
|
Delete a group |
|
|
List groups |
|
|
Query supported resource types |
|
|
Query group members |
|
|
Create a group |
|
|
Follow a group |
|
|
Unfollow a group |
|
|
Usage notes
The get, update, delete, member query, follow, and unfollow API operations support specifying a resource by GroupId.
ListObserveGroupInstancesis authorized against theobservegroup/<GroupId>resource. You can restrict member queries to specified groups.Listing groups requires the
cms:ListObserveGroupspermission on theobservegroup/*resource. The list returns only the groups for which the caller has thecms:GetObserveGrouppermission, 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 |
| Development | Development application |
|
| Development | Development test |
|
| Operations | Infrastructure |
|
| LLM | Model training |
|
| LLM | Model inference |
|
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 |
|
|
| View and update the two Development groups |
|
|
| View and update all five groups and query their members; the list shows only the groups that the caller can view |
|
|
| 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".
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 | Member query, get, and update permissions use the same group ARNs; the list query uses the |
A team can only view, not update | Remove | 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 |
|
|
Query supported resource types |
|
|
View group members |
| The ARN of the specific group in your team |
Follow a group |
| The ARN of the specific group in your team |
Unfollow a group |
| 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 | Allowed | Allowed | Denied |
View and update | Denied | Allowed | Denied |
View and update | 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
Check the actual identity: Confirm that the request uses the target RAM user or the expected STS role.
Check the failed action: Check the
AuthActionin the error message, and confirm that the policy contains the corresponding permission.Check the resource: Check the region, the UID of the account that owns the resource, the GroupId, and the ARN format.
Check the policy attachment target: When you use STS, confirm that the permissions are granted to the RAM role that is actually assumed.
Check for explicit deny statements and other permission restrictions: Rule out restrictions on the request from other policies.
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.