Creates a client key.
Operation description
To perform cryptographic operations and retrieve secret values, self-managed applications must use a client key to access a Key Management Service (KMS) instance. The following process shows how to create a client key-based application access point (AAP):
1.Create an access control rule: You can configure the private IP addresses or private CIDR blocks that are allowed to access a KMS instance. For more information, see CreateNetworkRule .
2.Create a permission policy: You can configure the keys and secrets that are allowed to access and bind access control rules to the keys and secrets. For more information, see CreatePolicy .
3.Create an AAP: You can configure an authentication method and bind a permission policy to an AAP. For more information, see CreateApplicationAccessPoint .
4.Create a client key: You can configure the encryption password and validity period of a client key and bind the client key to an AAP.
Precautions
A client key has a validity period. After a client key expires, applications into which the client key is integrated cannot access the required KMS instance. You must replace the client key before the client key expires. We recommend that you delete the expired client key in KMS after the new client key is used.
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| AapName | string | Yes | The operation that you want to perform. Set the value to CreateClientKey. | aap_test |
| Password | string | Yes | The name of the AAP. | bcfefe15-46f0**** |
| NotAfter | string | No | The encryption password of the client key. The password must be 8 to 64 characters in length and must contain at least two of the following types: digits, letters, and special characters. Special characters include | 2028-08-31T17:14:33Z |
| NotBefore | string | No | The end of the validity period of the client key. Specify the time in the ISO 8601 standard. The time must be in UTC. The time must be in the yyyy-MM-ddTHH:mm:ssZ format. Note
| 2023-08-31T17:14:33Z |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "2312e45f-b2fa-4c34-ad94-3eca50932916",
"ClientKeyId": "KAAP.66abf237-63f6-4625-b8cf-47e1086e****",
"KeyAlgorithm": "RSA_2048",
"PrivateKeyData": "MIIJqwIBAzCCCXcGCSqGSIb3DQEHAaCCCWgEgglkMIIJYDCCBBcGCSqGSIb3DQEHBqCCBAgwgg******",
"NotBefore": "2023-08-31T17:14:33Z",
"NotAfter": "2028-08-31T17:14:33Z"
}Error codes
For a list of error codes, visit the Service error codes.
