All Products
Search
Document Center

Microservices Engine:Grant permissions to manage cloud-native gateways

Last Updated:Mar 11, 2026

Microservices Engine (MSE) cloud-native gateways use Resource Access Management (RAM) for access control. Instead of sharing your Alibaba Cloud account credentials, create RAM users for team members and grant each user only the permissions they need.

This topic describes how to create a RAM user and assign gateway permissions through system or custom policies.

Permission model

MSE cloud-native gateways support two authorization levels:

LevelScopeUse case
Coarse-grainedFull access or read-only access to all MSE resourcesQuick setup for small teams
Fine-grainedSpecific actions on specific gateway instancesProduction environments that require least-privilege access

A typical team maps these levels to two roles:

RoleResponsibilitiesRecommended policy
O&M engineerCluster management, permission management, resource provisioningAliyunMSEFullAccess (system policy)
DeveloperConfiguration and service managementAliyunMSEReadOnlyAccess (system policy), or a custom policy for fine-grained control
Note

Resource usage and costs are billed to the Alibaba Cloud account, not to individual RAM users.

Prerequisites

Before you begin, make sure that you have:

  • An Alibaba Cloud account or a RAM user who has administrative rights

  • Access to the RAM console

Step 1: Create a RAM user

  1. Log on to the RAM console by using an Alibaba Cloud account or a RAM user who has administrative rights.

  2. In the left-side navigation pane, choose Identities > Users.

  3. On the Users page, click Create User.

    image

  4. In the User Account Information section, configure the following parameters:

    Note

    Click Add User to create multiple RAM users at a time.

    ParameterDescription
    Logon NameUp to 64 characters. Supports letters, digits, periods (.), hyphens (-), and underscores (_).
    Display NameUp to 128 characters.
    TagClick the edit icon, then enter a tag key and value. Tags help you organize and manage RAM users.
  5. In the Access Mode section, select an access mode:

    • Console Access -- The RAM user logs on to the Alibaba Cloud console. Configure the logon password, password reset policy, and multi-factor authentication (MFA) settings as needed.

      Note

      If you set the logon password to a custom password, it must meet the complexity requirements defined under Identities > Settings. For details, see Configure a password policy for RAM users.

    • Using permanent AccessKey to access -- An AccessKey pair is automatically created. The RAM user can call API operations or use development tools to access Alibaba Cloud resources.

    Note

    For security, select only one access mode per RAM user. This way, when an employee leaves the organization, revoking console access also prevents programmatic access.

  6. Click OK.

Step 2: Grant permissions to the RAM user

  1. Log on to the RAM console as a RAM administrator.

  2. In the left-side navigation pane, choose Identities > Users.

  3. Find the target RAM user and click Add Permissions in the Actions column.

    Note

    To grant permissions to multiple RAM users at once, select them and click Add Permissions at the bottom of the page.

    image

  4. In the Grant Permission panel, search for and select one or more policies, then click Grant permissions. Policies are classified into system policies and custom policies. See the following sections for details.

  5. Confirm that authorization is successful and click Close.

System policies (coarse-grained authorization)

PolicyDescription
AliyunMSEFullAccessFull permissions to manage MSE. The RAM user can perform all operations in the MSE console, equivalent to using the Alibaba Cloud account.
AliyunMSEReadOnlyAccessRead-only permissions for MSE. The RAM user can read all resources of the Alibaba Cloud account.

Custom policies (fine-grained authorization)

Custom policies restrict access to specific gateway instances and actions. To create a custom policy, see Create a custom policy.

Resource format

Custom policies use the following Alibaba Cloud Resource Name (ARN) format to identify gateway instances:

acs:mse:<region>:<account-id>:instance/<gateway-id>
FieldDescriptionExample
<region>Region ID, or * for all regionscn-hangzhou, *
<account-id>Alibaba Cloud account ID, or * for any account*
<gateway-id>Gateway instance IDgw-8090caa2a3ab447a8bc5fdf3********

Use acs:mse:*:*:* to match all MSE resources across all regions.

Policy statement structure

Each custom policy contains one or more statements. Each statement specifies which actions are allowed or denied on which resources.

FieldDescription
ActionThe MSE API actions to allow or deny. Wildcards are supported: mse:Get* matches all actions that start with Get.
ResourceThe gateway instances to which the statement applies. Use the ARN format above for instance-scoped actions, or acs:mse:*:*:* for actions that are not instance-scoped.
EffectAllow or Deny.

Example: Read-only access to a specific gateway

The following policy grants a RAM user read-only access to the gateway gw-8090caa2a3ab447a8bc5fdf3********. The user can view gateway configurations, routes, and services but cannot make changes.

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "mse:Query*",
                "mse:List*",
                "mse:Get*",
                "mse:Select*",
                "mse:Pull*",
                "mse:GatewayBlackWhite*",
                "mse:GatewayHealthCheckList",
                "mse:GatewayQueryMonitor",
                "mse:UploadWasmFile"
            ],
            "Resource": "acs:mse:*:*:instance/gw-8090caa2a3ab447a8bc5fdf3********",
            "Effect": "Allow"
        },
        {
            "Action": [
                "mse:QueryDefaultAlertStatus",
                "mse:ListGatewayZone",
                "mse:ListUpgradableGatewayVersions",
                "mse:ListTagResources",
                "mse:ListGatewayIngressMigrateTask",
                "mse:ListEventRecords",
                "mse:GetEventFilterOptions",
                "mse:GetEventDetail",
                "mse:GetGatewaySelection",
                "mse:GetGatewayAlarms",
                "mse:GetGatewayMigrateNamespacedServices",
                "mse:GetGatewayIngressMigrateTaskDetail",
                "mse:GetPluginGuide",
                "mse:GetRegExpCheck",
                "mse:GetRegExpTest",
                "mse:CheckPluginLua"
            ],
            "Resource": "acs:mse:*:*:*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "log:DescribeService",
                "log:ListProject",
                "log:GetProductDataCollection"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "arms:SearchContactGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

How this policy works:

StatementScopePurpose
1stSpecific gateway instanceGrants read actions (Query, List, Get, Select, Pull) on the target gateway only.
2ndAll MSE resources (acs:mse:*:*:*)Grants global read actions that are not instance-scoped, such as listing zones and checking upgrade versions.
3rdAll resources (*)Grants read access to Simple Log Service for monitoring features.
4thAll resources (*)Grants read access to Application Real-Time Monitoring Service (ARMS) for alerting features.

Example: Read-write access to a specific gateway

The following policy grants a RAM user full management access to the gateway gw-8090caa2a3ab447a8bc5fdf3********. The user can create, modify, and delete routes, services, and configurations on this gateway.

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "mse:*"
            ],
            "Resource": "acs:mse:*:*:instance/gw-8090caa2a3ab447a8bc5fdf3********",
            "Effect": "Allow"
        },
        {
            "Action": [
                "mse:QueryDefaultAlertStatus",
                "mse:CreateDefaultAlert",
                "mse:ListGatewayZone",
                "mse:ListUpgradableGatewayVersions",
                "mse:ListEventRecords",
                "mse:GetEventFilterOptions",
                "mse:GetEventDetail",
                "mse:GetGatewaySelection",
                "mse:GetGatewayAlarms",
                "mse:GetGatewayMigrateNamespacedServices",
                "mse:GetPluginGuide",
                "mse:GetRegExpCheck",
                "mse:GetRegExpTest",
                "mse:CheckPluginLua",
                "mse:*TagResources",
                "mse:*CustomPlugin",
                "mse:*GatewayIngressMigrateTask*"
            ],
            "Resource": "acs:mse:*:*:*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "log:DescribeService",
                "log:ListProject",
                "log:GetProductDataCollection",
                "log:OpenProductDataCollection"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "arms:SearchContactGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Differences from the read-only policy:

DifferenceRead-onlyRead-write
Gateway instance actionsmse:Query*, mse:List*, mse:Get*, and other read actionsmse:* (all actions, including create, update, and delete)
Global actionsRead-only global actionsAdds mse:CreateDefaultAlert, tag management (mse:*TagResources), custom plugin management (mse:*CustomPlugin), and ingress migration tasks (mse:*GatewayIngressMigrateTask*)
Log serviceRead-only (log:DescribeService, log:ListProject, log:GetProductDataCollection)Adds log:OpenProductDataCollection to enable log collection

What to do next

Share the RAM user credentials with team members. They can access MSE in two ways:

Log on to the console

  1. Go to the RAM User Logon page.

  2. Enter the RAM user logon name and click Next, then enter the password and click Log On.

    Note

    The logon name follows the format <$username>@<$AccountAlias> or <$username>@<$AccountAlias>.onaliyun.com. If no account alias is set, the Alibaba Cloud account ID is used by default.

  3. On the RAM user center page, click the target service to open its console.

Call API operations

Use the RAM user's AccessKey pair (AccessKey ID and AccessKey secret) in your code to authenticate API requests.

API-to-policy action reference

Use the following tables to identify the actions to include in custom policies.

Gateway management

ActionDescriptionRead-only
AddGatewayCreate a pay-as-you-go cloud-native gatewayNo
ListGatewayList gateway clustersYes
GetGatewayDetailGet cloud-native gateway detailsYes
GetGatewayGet cloud-native gateway informationYes
ListGatewaySlbList Server Load Balancer (SLB) instances of a gatewayYes
SelectGatewaySlbQuery existing SLB instancesNo
AddGatewaySlbAssociate an SLB instance with a gatewayNo
DeleteGatewaySlbDisassociate an SLB instance from a gatewayNo
DeleteGatewayDelete a pay-as-you-go cloud-native gatewayNo

Service source management

ActionDescriptionRead-only
ListServiceSourceList service sourcesYes
GetKubernetesSourceQuery existing Container Service for Kubernetes (ACK) clustersYes
GetMseSourceQuery existing MSE registriesYes
AddServiceSourceAdd a service sourceNo
DeleteServiceSourceRemove a service sourceNo
PullServicesList existing servicesYes
ImportServicesCreate or import servicesNo
ListGatewayServiceList subscribed servicesYes
GetGatewayServiceDetailGet service detailsYes
AddGatewayServiceVersionAdd a service versionNo
UpdateGatewayServiceVersionUpdate a service versionNo
DeleteGatewayServiceVersionRemove a service versionNo
UpdateGatewayServiceTrafficPolicyUpdate the load balancing policy of a serviceNo

Route management

ActionDescriptionRead-only
ListGatewayRouteList routesYes
AddGatewayRouteCreate a routeNo
ApplyGatewayRoutePublish a routeNo
OfflineGatewayRouteDisable a routeNo
DeleteGatewayRouteDelete a routeNo
GetGatewayRouteDetailGet route detailsYes
GetRateLimitGet throttling rules for a routeYes
AddRateLimitAdd a throttling rule to a routeNo
UpdateRateLimitDelete a throttling rule from a routeNo
UpdateGatewayRouteHTTPRewriteUpdate the rewrite policy of a routeNo
UpdateGatewayRouteHeaderOpUpdate the header settings of a routeNo
UpdateGatewayRouteCORSUpdate the cross-origin resource sharing (CORS) policy of a routeNo
UpdateGatewayRouteTimeoutUpdate the timeout policy of a routeNo
UpdateGatewayRouteRetryUpdate the retry policy of a routeNo

Certificate and domain name management

ActionDescriptionRead-only
ListGatewayDomainList associated domain namesYes
AddGatewayDomainAssociate a domain nameNo
GetGatewayDomainDetailGet domain name detailsYes
UpdateGatewayDomainUpdate associated domain name informationNo
DeleteGatewayDomainDisassociate a domain nameNo
ListSSLCertList existing certificatesYes
AddSSLCertAssociate a certificate with a domain nameNo
UpdateSSLCertUpdate the certificate of a domain nameYes

Other operations

ActionDescriptionRead-only
GetBlackWhiteListGet IP addresses in the blacklist and whitelistYes
AddBlackWhiteListAdd an IP address to the blacklist or whitelistNo
UpdateBlackWhiteListUpdate the blacklist and whitelistNo
AddGatewayAuthAdd an authentication methodNo
ListGatewayAuthList authentication methodsYes
UpdateGatewayAuthUpdate an authentication methodNo
DeleteGatewayAuthRemove an authentication methodNo
AddAuthResourceAdd an authentication URLNo
DeleteAuthResourceDelete an authentication URLNo