All Products
Search
Document Center

Key Management Service:Manage application access points

Last Updated:Mar 31, 2026
This topic applies only to users of the old version of Key Management Service (KMS). If you use KMS 3.0, see SDK references.

An application access point (AAP) controls how an application authenticates with KMS and which secrets it can access. Each AAP combines an authentication method with one or more role-based access control (RBAC) permission policies.

Choose an authentication method

Before creating an AAP, decide which authentication method fits your deployment:

MethodWhen to useWhat you configure
RAMRoleYour application runs on an Elastic Compute Service (ECS) instance, in a Container Service for Kubernetes (ACK) cluster, or in Function Compute — environments that support bound RAM rolesTrusted Role type and RAM role name
Client KeyYour application runs in an environment where binding a RAM role isn't possibleA client key you create and manage after the AAP is set up

RAMRole is the simpler option when your environment supports it. With Client Key, you generate a private key file that you must store and protect — KMS does not retain it.

Create an AAP

Prerequisites

Before you begin, ensure that you have:

  • Access to the KMS console

  • A RAM role (if using the RAMRole authentication method)

Steps

  1. Log on to the KMS console.

  2. In the top navigation bar, select the region where you want to create the AAP.

  3. In the left-side navigation pane, click Applications.

  4. Click Create Application Access Point.

  5. In the Create Application Access Point dialog box, configure the basic information:

    1. Enter a Name and an optional Description.

      The AAP name must be unique within the selected region in your Alibaba Cloud account.

    2. In the Authentication Method section, select an authentication method and fill in the required parameters:

      For RAMRole:

      ParameterDescriptionExample
      Trusted RoleThe type of environment where your application runs. KMS uses this to verify the RAM role's delegated trust rules. Valid values: ECS Instance Role, ACK Worker Role, Function Compute RoleECS Instance Role
      Role NameThe name of the RAM role bound to your application's environmentECSRole

      For Client Key: No parameters are required at this stage. After the AAP is created, bind a client key by following Bind a client key to the AAP.

    3. Click Next.

  6. Configure permission policies. Each policy defines what operations the AAP can perform and on which resources.

    The parameters work in sequence: Scope sets the KMS instance, RBAC Permissions sets the allowed operations, Accessible Resources sets the target resources, and Network Access Rules restricts which networks can call KMS.

    1. Click the plus sign icon to the right of Policies.

    2. In the RBAC Policy dialog box, configure the following parameters:

      ParameterDescriptionExample
      Policy nameA name for this permission policyRAMPolicy
      ScopeThe KMS instance this policy applies to. Select Shared KMS for the shared service, or select a dedicated KMS instance IDShared KMS
      RBAC permissionsThe permission template. SecretUser grants GetSecretValue calls on KMS. CryptoServiceKeyUser grants cryptographic operations on a dedicated KMS instanceSecretUser
      Accessible resourcesThe secrets or keys this policy covers. In the Resources section, select existing resources and click 箭头, or click plus sign in the Selected Resources section, enter a resource, and click Add. Use the asterisk (*) wildcard as a suffix to match multiple resourcessecret/dataKey****
      Network access rulesThe networks allowed to call KMS under this policy. Select an existing rule from Available Rules, or create one (see the following table)

      To create a network access rule, click plus sign and configure the following parameters in the Create Network Access Rule dialog box:

      ParameterDescriptionExample
      NameA name for this ruleNetwork
      Network typeThe network path your application uses to reach KMS. Public: public endpoint. VPC: VPC address. Private: Dedicated KMS over VPCVPC
      Description(Optional) A description for the ruleAccess the specified VPC
      Allowed IP addressesThe IP addresses permitted under this rule. For Public: public IP addresses. For VPC: VPC ID and IP addresses or CIDR blocks. For Private: private IP addresses or CIDR blocks. Separate multiple addresses with commas192.168.0.0/16

      Click Create, then select the rule and click 箭头 to add it to the policy.

    3. Click Create to save the RBAC policy.

    4. Select the policy and click 箭头 to attach it to the AAP.

    5. Click Next.

  7. Review the configuration and click Create.

Bind a client key to the AAP

If you selected the Client Key authentication method, complete this section after the AAP is created. The client key identifies your application to KMS.

  1. Click the name of the AAP.

  2. In the Client Key section, click Create Client Key.

  3. In the Create Client Key dialog box, configure the following parameters:

    ParameterDescriptionExample
    Encryption passwordThe password used to decrypt the private key file when your application connects to KMS. Store this password securelyTest****
    Validity periodThe date range during which the client key is validApril 3, 2022 to March 4, 2027
  4. Important: KMS displays the password and client key file only once, immediately after you click OK. KMS does not save the private key — it is stored in an encrypted PKCS#12 file that you can download only at this moment. If you close the dialog without saving both, you cannot recover them.

    Click OK.

  5. In the Created dialog box, save both credentials:

    • Password: Click Copy next to Decryption Password to copy the password.

    • Client key file: Click Download Client Key to download the PKCS#12 file.

    The client key file contains a key ID and the encrypted private key data:

    {
      "KeyId": "KAAP.71be72c8-73b9-44e0-bb75-81ee51b4****",
      "PrivateKeyData": "MIIJwwIBAz****ICNXX/pOw=="
    }

What's next

  • To learn how your application uses the AAP to retrieve secrets at runtime, see SDK references.