Issues a client certificate by using a custom certificate signing request (CSR) file.
Operation description
Before you call this operation, make sure that you have created a root certificate authority (CA) certificate by calling the CreateRootCACertificate operation and an intermediate CA certificate by calling the CreateSubCACertificate operation. Only intermediate CA certificates can be used to issue client certificates.
Limits
You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-cert:CreateClientCertificateWithCsr | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Csr | string | No | The content of the CSR file. You can generate a CSR file by using the OpenSSL tool or Keytool. For more information, see How do I create a CSR file? You can also create a CSR file in the Certificate Management Service console. For more information, see Create a CSR. | -----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST----- |
SanType | integer | No | The type of the Subject Alternative Name (SAN) extension that is supported by the client certificate. Valid values:
| 1 |
SanValue | string | No | The content of the extension. You can specify multiple SAN extensions. If you want to specify multiple SAN extensions, separate them with commas (,). | somebody@example.com |
Organization | string | No | The name of the organization. Default value: Alibaba Inc. | Alibaba Cloud Computing Co., Ltd. |
OrganizationUnit | string | No | The name of the department. Default value: Aliyun CDN. | Security |
Country | string | No | The code of the country in which the organization is located, such as CN and US. | CN |
CommonName | string | No | The common name of the certificate. The value can contain letters. Note
If you specify the CsrPemString parameter, the value of the CommonName parameter is determined by the CsrPemString parameter.
| aliyundoc.com |
State | string | No | The province, municipality, or autonomous region in which the organization is located. The value can contain letters. The default value is the name of the province, municipality, or autonomous region in which the organization is located. The organization is associated with the intermediate CA certificate from which the certificate is issued. | Zhejiang |
Locality | string | No | The name of the city in which the organization is located. The value can contain letters. The default value is the name of the city in which the organization is located. The organization is associated with the intermediate CA certificate from which the certificate is issued. | Hangzhou |
Algorithm | string | No | The key algorithm of the client certificate. The key algorithm is in the
The encryption algorithm of the client certificate must be the same with the encryption algorithm of the intermediate CA certificate. The key length can be different. For example, if the key algorithm of the intermediate CA certificate is RSA_2048, the key algorithm of the client certificate must be RSA_1024, RSA_2048, or RSA_4096. Note
You can call the DescribeCACertificate operation to query the key algorithm of an intermediate CA certificate.
| RSA_2048 |
ParentIdentifier | string | No | The unique identifier of the intermediate CA certificate from which the client certificate is issued. Note
You can call the DescribeCACertificateList operation to query the unique identifier of an intermediate CA certificate.
| 270ae6bb538d538c70c01f81fg3**** |
Years | integer | No | The validity period of the client certificate. Unit: years. | 1 |
Months | integer | No | The validity period of the client certificate. Unit: months. | 12 |
Days | integer | No | The validity period of the client certificate. Unit: days. You must specify at least one of the Days, BeforeTime, and AfterTime parameters. The BeforeTime and AfterTime parameters must be both empty or both specified. The following list describes how to specify these parameters:
Note
| 365 |
BeforeTime | long | No | The issuance time of the client certificate. This value is a UNIX timestamp. The default value is the time when you call this operation. Unit: seconds. Note
The BeforeTime and AfterTime parameters must be both empty or both specified.
| 1634283958 |
AfterTime | long | No | The expiration time of the client certificate. This value is a UNIX timestamp. Unit: seconds. Note
The BeforeTime and AfterTime parameters must be both empty or both specified.
| 1665819958 |
Immediately | integer | No | Specifies whether to return the certificate. Valid values:
| 1 |
EnableCrl | long | No | include the CRL address.
| 1 |
All Alibaba Cloud API requests must include common request parameters.
For more information about sample requests, see the "Examples" section of this topic.
Response parameters
Examples
Sample success responses
JSON
format
{
"X509Certificate": "-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----",
"CertificateChain": "-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n",
"Identifier": "200ae6bb538d538c70c01f81dcf2****",
"SerialNumber": "0f29522da2dae7a1c4b6ab7132ad3c06",
"RequestId": "31C66C7B-671A-4297-9187-2C4477247A74"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2023-09-05 | The request parameters of the API has changed | see changesets | ||||
| ||||||
2023-07-13 | The request parameters of the API has changed | see changesets | ||||
|