Updating SAP Key Attributes
Use the patch /v1/cckm/sap/keys/{id}
API to update the SAP key attributes such as key name, description, whether enabled, whether exportable, and key operations.
Syntax
curl -k '<IP>/api/v1/cckm/sap/keys/{id}' -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
is the resource ID of the SAP key.
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authentication token. |
description | string | Description of the key. |
enabled | boolean | Whether to enable the key. Set to true to enable the key, set to false to disable the key. |
exportable | boolean | Whether the key is exportable. Set to true to make the key exportable, set to false to make the key non-exportable. |
name | string | Name of the key. |
operations | array of strings | Cryptographic operations allowed to the key. Possible values are: • ENCRYPT • DECRYPT • SIGN • VERIFY • WRAP • UNWRAP |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/sap/keys/d109deae-5ca7-421d-bf49-637e65c3bbcb' -X PATCH -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI3ZjRlNmJkNi0wMzgzLTQ4MGMtYWZmZS0wYTQxNDgzZmVlNmUiLCJzdWIiOiJsb2NhbHxlNjM3NTVjOS01YzRhLTQ0NzUtOWI0Zi0wN2JjNzQxYjQ1MGEiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODJlZTQ2MzAtNjQwMi00MTQ3LTliNDYtNWE5YzU1OGVjZWU4Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImUwYWQ2NGMzLTFkZWItNGY2YS04YmE2LTE4MTUzMDdkMjJiZCIsImlhdCI6MTYzNDU0MTE1MCwiZXhwIjoxNjM0NTQxNDUwfQ.3F6KjmNnYMGuHkDtHIlc_tpv1vyWMNoiAtBELu8Yk1k' -H 'Content-Type: application/json' --data-binary $'{\n "description": "test description",\n "exportable": false,\n "enabled": false,\n "name": "key1",\n "operations": []\n}' --compressed
Example Response
{
"id":"d109deae-5ca7-421d-bf49-637e65c3bbcb",
"uri":"kylo:kylo:cckm:sap-key:testsapkey1-38ae47c5-296f-4b24-9016-82212cd9360c",
"account":"kylo:kylo:admin:accounts:kylo",
"createdAt":"2021-10-18T04:24:18.88509Z",
"updatedAt":"2021-10-18T07:13:36.977871Z",
"cloud_name":"sap",
"tenant":"thales-preprod",
"sap_param":{
"description":"test description",
"enabled":false,
"exportable":false,
"groupId":"489ac34d-3e9c-4be3-8c1c-2c383bf31461",
"sap_key_id":"d109deae-5ca7-421d-bf49-637e65c3bbcb",
"keystoreContext":{
"customerHeld":false
},
"meta":{
"created":"2021-10-18T04:24:18Z",
"creatorId":"69f41156-5197-490d-aa5f-f1ffb0ab4e66",
"creatorName":"creator.name@xyz.com",
"imported":false,
"primaryVersion":2,
"totalVersions":3
},
"name":"key1",
"operations":[
"DECRYPT",
"ENCRYPT"
],
"role":"UNSPECIFIED",
"size":256,
"type":"AES"
},
"cckm_group_name":"Gooey_1",
"cckm_group_id":"901c5559-31d0-467e-ac3c-dd5000850085",
"backup_blob":"",
"gone":false,
"origin":"native",
"auto_rotate":false,
"sap_application":"S4H",
"sap_group_name":"Gooey_1",
"Deleted":false
}
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.