Restoring an Azure Key
Use the post /v1/cckm/azure/keys/{id}/restore
API to restore a backed up key to a vault.
Syntax
curl -k '<IP>/api/v1/cckm/azure/keys/{id}/restore' -X POST -H 'Authorization: Bearer AUTHTOKEN' -H 'accept: application/json' --compressed
Here, {id}
represents the key ID.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
azure_cloud_key_backup_id (optional) | string | Id of the Azure cloud key backup which will be used to restore. By default, the latest key backup will be restored. |
key_vault (optional) | string | Id or name of the vault where the key will be restored. By default, the key will be restored to the vault from where it was deleted. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/azure/keys/olik9/restore' -X POST -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJmMDIzNjMxNC05ZGFkLTRlYmMtODZlYS03ZjU0OGU0N2ZhN2EiLCJzdWIiOiJsb2NhbHxlZmYwMjIwNy03NDFhLTRjZDAtYTFmYy1jYTkzMTMzYmNlMzkiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJjbGllbnRfaWQiOiI4MzdjODQwZC03NWRkLTRiNGYtYTMxOC03OWNiMTZjYTI0OGQiLCJjbGllbnRfbmFtZSI6ImFwaS1wbGF5Z3JvdW5kIiwiY2xpZW50X3R5cGUiOiJwdWJsaWMiLCJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODM3Yzg0MGQtNzVkZC00YjRmLWEzMTgtNzljYjE2Y2EyNDhkIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImFjZjdjODcyLWZiNDctNDc4Yi04OThjLTdlY2RlYmE0YTFmZiIsImlhdCI6MTcxNjQ0ODIyMiwiZXhwIjoxNzE2NDQ4NTIyfQ.aJFmZsJUr2WbJAZDbHi3qBYIB1pBmJWy_aExCxdzPzyHsdT6B8erSxgjRx2rJ8Mn5TwH20Kle85qZONCHKgmJw' -H 'accept: application/json' --compressed
Example Response
{
"id": "8658e434-1be1-4da6-9c6b-d4ec4f0e91f9",
"uri": "kylo:kylo:cckm:azure-key:8658e434-1be1-4da6-9c6b-d4ec4f0e91f9",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-09-15T11:10:10.06094Z",
"updatedAt": "2020-09-15T11:14:37.315345278Z",
"key_vault": "azure-vaults::c0d7f123-6058-418c-bcb0-5e68701df869",
"key_vault_id": "1c8f6a5e-5755-4397-92eb-0f95e31bb66c",
"region": "northcentralus",
"deleted": false,
"backup_at": "2020-09-15T11:10:10.049846Z",
"soft_delete_enabled": true,
"key_soft_deleted_in_azure": false,
"status": "AVAILABLE",
"syncedAt": "2020-09-15T11:10:08Z",
"created_by": "ef767cf9-61dd-4765-a4df-ebd65493c728",
"modified_by": "ef767cf9-61dd-4765-a4df-ebd65493c728",
"version": "ccda2f06b4e946f6be5c7207d9ced115",
"key_size": 2048,
"backup": "301072592b2946c983bc8d80edc8439fc826f0fc979642309ba407572e5ee0c4",
"key_name": "test-key",
"cloud_name": "AzureCloud",
"azure_param": {
"key": {
"kid": "https://azure-vaults.vault.azure.net/keys/test-key/ccda2f06b4e946f6be5c7207d9ced115",
"kty": "RSA",
"key_ops": [
"encrypt",
"decrypt",
"sign",
"verify",
"wrapKey",
"unwrapKey"
],
"n": "_gyC1SIMXWtxqRPXeeibK-0Lh9nH7vVaFdS24og2-xefC8gwiH-tSdd3tzzrI5zOllpKGpzOis3kV6I312uVMnILJ1PLyjTRLtcfmFGKCELOEzdhEYX7JqcSj0zi9nEIvuJs2dv9kTKRzPywzcpwM9LvSz0XarhmsfaNBjxlJumVH0gG4ZtPXfLogPjfwv9n6gHt7wC2O0DuWUcWgVL2cvbtZsqeFQ0B6a7kipjWEqNHUQdX1o79XW-EliiHlUMYXdKKWRmwzRPUYdUssfEwIiqPNLph-VQWdDpJSxtxATBpJKy-LASodX6mHpbsoTP0Ampp5f_QMZVhn1yQywPsbw",
"e": "AQAB"
},
"attributes": {
"recoveryLevel": "CustomizedRecoverable+Purgeable",
"enabled": true,
"created": 1600168208,
"updated": 1600168208
}
},
"azure_created_at": "2020-09-15T11:10:08Z",
"azure_updated_at": "2020-09-15T11:10:08Z",
"tenant": "3428547a-39df-4802-9aa5-f7476b1f6641",
"key_material_origin": "native",
"gone": false
}
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.