Tags help you identify and classify cloud resources. Use RAM permission policies to manage user identity and control access to cloud resources. Add tags to classify ACK cluster resources, match them to RAM permission policies for fine-grained access control, and grant different users access to different clusters.
Procedure
Create a custom policy requiring specific tags for ACK cluster access, then attach the policy to a RAM user.
-
Log on to the RAM console with your Alibaba Cloud account and create a custom policy. Use the Condition element to set tag conditions on cloud resources.
NoteAn Alibaba Cloud account has full permissions on all resources. You can also grant AdministratorAccess to a RAM user to make it an account administrator who manages all resources. See Create a RAM user as an account administrator.
ACK supports the following condition keys:
Condition key
Description
acs:RequestTagRequires requests to include specific tags.
If the API request lacks a tag parameter,
acs:RequestTagconditions cause authorization to fail.acs:ResourceTagRequires resources to have specific tags.
If the API request lacks a resource ID parameter,
acs:ResourceTagconditions cause authorization to fail.See Use cases for policy examples.
-
Attach the custom policy to the RAM user. See Manage the permissions of a RAM user. When creating the policy, check Resource types that support tags and Actions that do not support tag-based authorization.
NoteBefore granting permissions to a RAM user, review their existing policies to avoid duplicates or conflicts.
Use cases
Adapt these custom policy templates based on the principle of least privilege.
|
Permission policy |
Description |
Result |
|
Allows creating only clusters with the |
|
|
Allows viewing only clusters with the |
|
|
Prevents the user from modifying tags. |
If you attempt to modify a tag, the operation fails. Error code: |
References
Resource types that support tags
ACK supports tag-based authorization only for the following resource types.
Service name | Service code | Resource type |
ACK | cs | cluster: cluster |
Actions that do not support tag-based authorization
The following ACK actions do not support tag-based authorization. See Custom policy examples.
Action | Description |
cs:OpenAckService | Enable ACK |
cs:ListOperationPlans | Query the automatic O&M schedules of a cluster |
cs:CancelOperationPlan | Cancel a pending automatic O&M plan |
cs:DescribeTaskInfo | Query the details of a task |
cs:PauseTask | Pause a task |
cs:CancelTask | Cancel a task |
cs:ResumeTask | Resume a task |
cs:CreateKubernetesTrigger | Create an application trigger |
cs:DeleteTriggerHook | Delete a trigger |
cs:CreateTemplate | Create an orchestration template |
cs:DeleteTemplate | Delete an orchestration template |
cs:UpdateTemplate | Update an orchestration template |
cs:DescribeTemplates | Query all orchestration templates |
cs:DescribeTemplateAttribute | Query the details of an orchestration template |
cs:ListUserKubeConfigStates | Query the KubeConfig status list of all clusters that belong to a specific user |
cs:ListAddons | Query available add-ons |
cs:DescribeAddon | Query a specific add-on |
cs:DescribeAddons | Query all add-ons |
cs:DescribeEvents | Query event details |
cs:DescribeEventsForRegion | Query events in a specific region |
cs:DescribeKubernetesVersionMetadata | Query the details of a Kubernetes version |
cs:CheckServiceRole | Check whether a specific service role is assigned |
cs:DescribePatternTypes | Query instance types |
cs:CheckUserClustersActivity | Check the active status of a user in a specific cluster |
cs:CreateSessionMessage | Create an ACK AI Assistant session |
cs:UpdateMessageFeedback | Update ACK AI Assistant message feedback |
cs:DescribeKubeConfigManagementTaskList | List the tasks related to kubeconfig files |
cs:ListHaveKubeconfigDeletedAccounts | Query the users whose accounts have deleted RAM users or RAM roles, but whose kubeconfig files remain active. |
cs:ListKubeConfigRecycle | List the kubeconfig files in the recycle bin within the current Alibaba Cloud account |
cs:RestoreKubeConfigRecycleItem | Restore a deleted kubeconfig file from the recycle bin |
cs:RestoreMultiKubeConfigRecycleItems | Batch restore deleted kubeconfig files from the recycle bin |
cs:DeleteKubeConfigRecycleItem | Permanently delete a kubeconfig file from the recycle bin |
cs:DescribeKubernetesVersionMetadata | Query the details of a Kubernetes version |
cs:DescribePolicies | Query the policy list |
cs:DescribePolicyDetails | Query the details of a specific policy |
cs:DescribeUserInstances | Obtain the node list required to add an existing node |
cs:DescribeUserPermission | Query the permissions of a RAM user or a RAM role |
cs:UpdateUserPermissions | Update the Role-Based Access Control (RBAC) permissions of a specific RAM user or RAM role |
cs:CleanUserPermissions | Clear the certificate of a specific user and the related RBAC permissions |
cs:QueryAlertContact | Query an alert contact |
cs:AddOrUpdateAlertContact | Update an alert contact |
cs:DeleteAlertContact | Delete an alert contact |
cs:QueryAlertContactGroup | Query alert contact groups |
cs:AddOrUpdateAlertContactGroup | Update an alert contact group |
cs:DeleteAlertContactGroup | Delete an alert contact group |
cs:DescribeUserQuota | Query quota information |
cs:ListOperationPlans | Query the list of auto O&M task plans |
cs:CancelOperationPlan | Cancel auto O&M task plans |
cs:DescribeTasks | Query the task list |
Custom policy examples
A RAM user or a RAM role that has account-level permissions can perform operations on resources within the entire account. Make sure that the permissions granted to the RAM user or RAM role meet your expectations and follow the principle of least privilege.
Policies with tag conditions do not apply to actions that do not support tag-based authorization. Create a separate policy for these actions with the resource scope set toAccount and no tag conditions.
Adjust these examples as needed.
-
The
Actionlist includes all read-only actions that do not support tag-based authorization.{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "cs:DescribeAddon", "cs:DescribeAddons", "cs:DescribeEvents", "cs:DescribeEventsForRegion", "cs:DescribeKubeConfigManagementTaskList", "cs:DescribeKubernetesVersionMetadata", "cs:DescribePatternTypes", "cs:DescribePolicies", "cs:DescribePolicyDetails", "cs:DescribeTaskInfo", "cs:DescribeTemplateAttribute", "cs:DescribeTemplates", "cs:DescribeUserInstances", "cs:DescribeUserPermission", "cs:ListAddons", "cs:ListHaveKubeconfigDeletedAccounts", "cs:ListKubeConfigRecycle", "cs:ListOperationPlans", "cs:ListUserKubeConfigStates", "cs:QueryAlertContact", "cs:QueryAlertContactGroup", "cs:CheckServiceRole", "cs:DescribeTasks", "cs:DescribeUserQuota", "cs:ListOperationPlans", "cs:CheckUserClustersActivity" ], "Resource": "*" } ] } -
The
Actionlist includes all actions that do not support tag-based authorization.{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "cs:AddOrUpdateAlertContact", "cs:AddOrUpdateAlertContactGroup", "cs:CancelOperationPlan", "cs:CancelTask", "cs:CheckServiceRole", "cs:CheckUserClustersActivity", "cs:CleanUserPermissions", "cs:CreateKubernetesTrigger", "cs:CreateSessionMessage", "cs:CreateTemplate", "cs:DeleteAlertContact", "cs:DeleteAlertContactGroup", "cs:DeleteKubeConfigRecycleItem", "cs:DeleteTemplate", "cs:DeleteTriggerHook", "cs:DescribeAddon", "cs:DescribeAddons", "cs:DescribeEvents", "cs:DescribeEventsForRegion", "cs:DescribeKubeConfigManagementTaskList", "cs:DescribeKubernetesVersionMetadata", "cs:DescribePatternTypes", "cs:DescribePolicies", "cs:DescribePolicyDetails", "cs:DescribeTaskInfo", "cs:DescribeTemplateAttribute", "cs:DescribeTemplates", "cs:DescribeUserInstances", "cs:DescribeUserPermission", "cs:ListAddons", "cs:ListHaveKubeconfigDeletedAccounts", "cs:ListKubeConfigRecycle", "cs:ListOperationPlans", "cs:ListUserKubeConfigStates", "cs:OpenAckService", "cs:DescribeTasks", "cs:PauseTask", "cs:QueryAlertContact", "cs:QueryAlertContactGroup", "cs:RestoreKubeConfigRecycleItem", "cs:RestoreMultiKubeConfigRecycleItems", "cs:ResumeTask", "cs:UpdateMessageFeedback", "cs:DescribeUserQuota", "cs:ListOperationPlans", "cs:CancelOperationPlan", "cs:UpdateTemplate", "cs:UpdateUserPermissions" ], "Resource": "*" } ] }