Creates an application identity credential (ClientKey).
Operation description
-
For details about the permission policies that must be granted to a Resource Access Management (RAM) user or RAM role to call this API operation, see Access control.
-
Before a self-managed application can perform cryptographic operations or obtain credential values, it must access the KMS instance by using a ClientKey. The overall process of creating an application access point (AAP) and a ClientKey is as follows:
Create a network control rule: Configure the private IP or private CIDR block that is allowed to access KMS. For more information, see CreateNetworkRule.
Create an access policy: Configure the keys and credentials that the application is allowed to access, and attach the network control rule. For more information, see CreatePolicy.
Create an application access point: Configure the authentication method, and attach the access policy. For more information, see CreateApplicationAccessPoint.
Create a ClientKey: Configure the encryption passphrase and validity period of the ClientKey, and attach the application access point. This is the content described in this topic.
Precautions
A ClientKey has a validity period. After the ClientKey expires, KMS does not allow applications integrated with the ClientKey to access the KMS instance. Replace the ClientKey before it expires. Delete the expired ClientKey in KMS after the replacement is complete.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kms:CreateClientKey |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AapName |
string |
Yes |
The name of the attached application access point (AAP). |
aap_test |
| Password |
string |
Yes |
The passphrase of the ClientKey. The passphrase must be 8 to 64 characters in length and can contain digits, uppercase and lowercase letters, and special characters such as |
bcfefe15-46f0**** |
| NotAfter |
string |
No |
The end time of the validity period of the ClientKey. The time is specified in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. Note
|
2028-08-31T17:14:33Z |
| NotBefore |
string |
No |
The start time of the validity period of the ClientKey. The time is specified in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC. Note
|
2023-08-31T17:14:33Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. It is a unique identifier generated by Alibaba Cloud for the request and can be used to troubleshoot and locate issues. |
2312e45f-b2fa-4c34-ad94-3eca50932916 |
| ClientKeyId |
string |
The ID of the ClientKey. |
KAAP.66abf237-63f6-4625-b8cf-47e1086e**** |
| KeyAlgorithm |
string |
The algorithm used to encrypt the private key content of the ClientKey. Only RSA_2048 is supported. |
RSA_2048 |
| PrivateKeyData |
string |
The private key content of the ClientKey. |
MIIJqwIBAzCCCXcGCSqGSIb3DQEHAaCCCWgEgglkMIIJYDCCBBcGCSqGSIb3DQEHBqCCBAgwgg****** |
| NotBefore |
string |
The start time of the validity period of the ClientKey. |
2023-08-31T17:14:33Z |
| NotAfter |
string |
The end time of the validity period of the ClientKey. |
2028-08-31T17:14:33Z |
Examples
Success response
JSON format
{
"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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.