Updating Attributes of Azure Certificates
Use the patch /v1/cckm/azure/certificates/{id}
API to update the attributes of a certificate. You can modify the attributes and tags of the certificate.
Syntax
curl -k '<IP>/api/v1/cckm/azure/certificates/{id}' -X PATCH -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary $'{\n "attributes": {\n "nbf": "<activation-time>",\n "exp": "<expiration-time>"\n },\n "tags": {\n "key1": "value1"\n }\n}' --compressed
Here, {id}
is the resource ID of the certificate on the CipherTrust Manager.
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
attributes | JSON | Certificate attributes to be updated. Refer to Certificate Attributes for details. |
tags | JSON | An optional parameter to add additional information to the certificate. The value must be specified as the key-value pair. Refer to the following rules on tag values. |
CCKM allows the following characters in tag values:
Alphanumeric characters
Special characters ** ! @ # $ ) ( { } > < ? + - / [ ] ^ & + = | ~ ` ; . ' _ **
CCKM does not allow the following special characters in tag values:
** \ , : " % **
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/azure/certificates/beb06ea5-47a0-4d47-85c0-0a0e4f1a9531' -X PATCH -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary $'{\n "attributes": {\n "enabled": true\n },\n "tags": {\n "Key1": "Value1"\n }\n}' --compressed
Example Response
{
"id": "4e6cdba1-a87b-4b52-9933-b61c0bf9e6aa",
"uri": "kylo:kylo:cckm:azure-cert:test-cert-995fad5f-9f26-47d6-a537-6c980ff6bfcf",
"account": "kylo:kylo:admin:accounts:kylo",
"createdAt": "2022-04-13T02:05:26.859118132Z",
"updatedAt": "2022-04-13T02:05:26.859118132Z",
"synced_at": "2022-04-13T02:05:21Z",
"cloud_name": "AzureCloud",
"key_vault": "vault-name::260ecbe7-777b-4d3c-84ea-887620498863",
"key_vault_id": "84340213-a515-43d1-acc4-e2eaa6efbe94",
"region": "northcentralus",
"tenant": "781b4642-6e0e-4794-94df-6b0878ab0317",
"azure_created_at": "2022-04-13T02:05:21Z",
"azure_expire_at": "2023-04-13T02:05:21Z",
"azure_updated_at": "2022-04-13T02:05:21Z",
"backup": "4f408a63211b4f62b74bf611a13e7fbc1c6df4bc01864be3a2058823c7fc81e7",
"backup_at": "2022-04-13T02:05:26.843615617Z",
"cert_name": "test-cert",
"cert_soft_deleted_in_azure": false,
"deleted": false,
"gone": false,
"cert_material_origin": "native",
"cert_source": "native",
"operation": "",
"soft_delete_enabled": true,
"status": "AVAILABLE",
"version": "077969ab4e4b43c8805eabee58228fd2",
"azure_param": {
"cer": "MIID3jCCAsagAwIBAgIQP7++Dp34TaSAWcrnj9SoZzANBgkqhkiG9w0BAQsFADBsMRcwFQYDVQQDEw53d3cuY29udG9zby5jbzETMBEGA1UECxMKQ29udG9zbyBIUjEQMA4GA1UEChMHQ29udG9zbzEQMA4GA1UEBxMHUmVkbW9uZDELMAkGA1UECBMCV0ExCzAJBgNVBAYTAlVTMB4XDTIyMDQxMzAxNTUyMVoXDTIzMDQxMzAyMDUyMVowbDEXMBUGA1UEAxMOd3d3LmNvbnRvc28uY28xEzARBgNVBAsTCkNvbnRvc28gSFIxEDAOBgNVBAoTB0NvbnRvc28xEDAOBgNVBAcTB1JlZG1vbmQxCzAJBgNVBAgTAldBMQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM9vldyArb/RhYt5tjheV3LhKExzlFXU0uDFgHeO/UAZm5KYYRPeoy4RCxtPFqdJs+vgbnPdW/t9ume/Fuek03pNVsSUmZLMSwx0jmuueP3WuPoSBfk5NQwVvN8tFtMJ44qkYc9SvPIAMpf81hWZJXI/d2445SVrGn0CC9JROlwsewMxlpyK5jaD0OoTPGmaa+OY9zF+yv3/+Mq1s+3b9wDks8Ml6/VJuqw7N0fgLwdaAcc2VnQc13PKVkFXauk+UfnSWes7LtyDypeEPo11Hn08Wh7PmF2yuWpB4ii1MfyDy3p4n+JqVgzlffgXYlBryNkSRxzyTCEN62ZW0uhAHgECAwEAAaN8MHowDgYDVR0PAQH/BAQDAgWgMAkGA1UdEwQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB8GA1UdIwQYMBaAFE29V+lwbHNxH6Wf2CeH0wNM5+5HMB0GA1UdDgQWBBRNvVfpcGxzcR+ln9gnh9MDTOfuRzANBgkqhkiG9w0BAQsFAAOCAQEASvOmWOvjinVo5VBDzJ21FNk69UzmSwdZV48kFT13AS9AFdL28Xmi0PU97QnA9eMEdqsd0H88XP5F2MipRr1bzy9cyrnzKThByWTeDiNdxxnPvZLoPN+MndK3ZuSgFNJWNBQUUZuDuXk+3AFRzsTn5ysjc0exTqDx5FCOeJk3JFYtrPb8K0Mj6Wh/iin+cH86FTZCl9ANyf/ezX/wrbnchS0S0rSZBrHpQtpz1h+9pqagLLARX0BXYKTmae8H+tDnNOBDre5DWKWikBZtk8XQAGwmMd47UXzg6JVVQTCwCycoqmDGvMqdzZE7at13M0HiujwcCzMHWxmOz/tOFcITFw==",
"kid": "https://vault-name.vault.azure.net/keys/test-cert/077969ab4e4b43c8805eabee58228fd2",
"sid": "https://vault-name.vault.azure.net/secrets/test-cert/077969ab4e4b43c8805eabee58228fd2",
"x5t": "Xq1g2L-c5aOUB33QPCaiNQUFdAg",
"lifetime_actions": [
{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "AutoRenew"
}
}
],
"crv": "",
"exportable": true,
"key_size": 2048,
"kty": "RSA",
"content_type": "application/x-pkcs12",
"ekus": [
"1.3.6.1.5.5.7.3.1",
"1.3.6.1.5.5.7.3.2"
],
"key_usage": [
"digitalSignature",
"keyEncipherment"
],
"subject": "C=US, ST=WA, L=Redmond, O=Contoso, OU=Contoso HR, CN=www.contoso.co",
"validity_months": 12,
"issuer_name": "Self",
"attributes": {
"created": 1649815521,
"enabled": true,
"exp": 1681351521,
"nbf": 1649814921,
"recoverable_days": 7,
"recovery_level": "CustomizedRecoverable+Purgeable",
"updated": 1649815521
}
}
}
The sample output shows that the attributes
and tags
parameters are modified.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.