ves-io-schema-kms_key-API-Create
Examples of creating kms_key
Usecase:
Create kms-rsa-key-default
Request using vesctl:
vesctl configuration create kms_key -i kms_key.yaml
where file kms_key.yaml has following contents (kms_key.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "kms-rsa-key-default",
"namespace": "documentation"
},
"spec": {
"key_info": {
"rsa_key": {}
}
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "kms-rsa-key-default",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "72d2180e-e8ac-46f5-9b0f-87eb4c4b2573",
"creation_timestamp": "2024-03-21T14:05:55.829207Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"sensitivity": "SENSITIVITY_MEDIUM",
"policies": [],
"max_cache_age": null
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-rsa-key-default","namespace":"documentation"},"spec":{"key_info":{"rsa_key":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 715
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:55 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-rsa-key-default",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "72d2180e-e8ac-46f5-9b0f-87eb4c4b2573",
"creation_timestamp": "2024-03-21T14:05:55.829207Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"sensitivity": "SENSITIVITY_MEDIUM",
"policies": [
],
"max_cache_age": null
}
}
Usecase:
Create kms-rsa-key-with-params
Request using vesctl:
vesctl configuration create kms_key -i kms_key.yaml
where file kms_key.yaml has following contents (kms_key.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "kms-rsa-key-with-params",
"namespace": "documentation"
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"key_info": {
"rsa_key": {
"params": {
"key_size": 2048,
"ES_schemes": [
"RSAES_OAEP",
"RSAES_PKCS1_V15"
],
"SSA_schemes": [
"RSASSA_PKCS1_V15",
"RSASSA_PSS"
],
"hash_algos": [
"SHA256"
]
}
}
}
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "kms-rsa-key-with-params",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "87ab4315-b5df-4fd9-85b9-ba30c4c3dbb8",
"creation_timestamp": "2024-03-21T14:05:55.851577Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [],
"max_cache_age": null
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-rsa-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"rsa_key":{"params":{"key_size":2048,"ES_schemes":["RSAES_OAEP","RSAES_PKCS1_V15"],"SSA_schemes":["RSASSA_PKCS1_V15","RSASSA_PSS"],"hash_algos":["SHA256"]}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 716
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:55 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-rsa-key-with-params",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "87ab4315-b5df-4fd9-85b9-ba30c4c3dbb8",
"creation_timestamp": "2024-03-21T14:05:55.851577Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [
],
"max_cache_age": null
}
}
Usecase:
Create kms-aes-key-default
Request using vesctl:
vesctl configuration create kms_key -i kms_key.yaml
where file kms_key.yaml has following contents (kms_key.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "kms-aes-key-default",
"namespace": "documentation"
},
"spec": {
"key_info": {
"aes_key": {}
}
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "kms-aes-key-default",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "a84fd518-d13b-4e0d-b75f-dc3561513fba",
"creation_timestamp": "2024-03-21T14:05:55.930341Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"sensitivity": "SENSITIVITY_MEDIUM",
"policies": [],
"max_cache_age": null
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-aes-key-default","namespace":"documentation"},"spec":{"key_info":{"aes_key":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 715
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:55 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-aes-key-default",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "a84fd518-d13b-4e0d-b75f-dc3561513fba",
"creation_timestamp": "2024-03-21T14:05:55.930341Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"sensitivity": "SENSITIVITY_MEDIUM",
"policies": [
],
"max_cache_age": null
}
}
Usecase:
Create kms-aes-key-with-params
Request using vesctl:
vesctl configuration create kms_key -i kms_key.yaml
where file kms_key.yaml has following contents (kms_key.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "kms-aes-key-with-params",
"namespace": "documentation"
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"key_info": {
"aes_key": {
"params": {
"key_size": 256,
"nonce_size_min": 96,
"nonce_size_max": 256
}
}
}
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "kms-aes-key-with-params",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "7d5b8a3f-e6a9-4a00-a7ef-c95d886c9a93",
"creation_timestamp": "2024-03-21T14:05:55.953809Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [],
"max_cache_age": null
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-aes-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"aes_key":{"params":{"key_size":256,"nonce_size_min":96,"nonce_size_max":256}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 716
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:55 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-aes-key-with-params",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "7d5b8a3f-e6a9-4a00-a7ef-c95d886c9a93",
"creation_timestamp": "2024-03-21T14:05:55.953809Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [
],
"max_cache_age": null
}
}
Usecase:
Create kms-hmac-key-default
Request using vesctl:
vesctl configuration create kms_key -i kms_key.yaml
where file kms_key.yaml has following contents (kms_key.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "kms-hmac-key-default",
"namespace": "documentation"
},
"spec": {
"key_info": {
"hmac_key": {}
}
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "kms-hmac-key-default",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "f152868a-4300-4e34-937d-c518e1d7673d",
"creation_timestamp": "2024-03-21T14:05:55.976865Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"sensitivity": "SENSITIVITY_MEDIUM",
"policies": [],
"max_cache_age": null
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-hmac-key-default","namespace":"documentation"},"spec":{"key_info":{"hmac_key":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 716
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:55 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-hmac-key-default",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "f152868a-4300-4e34-937d-c518e1d7673d",
"creation_timestamp": "2024-03-21T14:05:55.976865Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"sensitivity": "SENSITIVITY_MEDIUM",
"policies": [
],
"max_cache_age": null
}
}
Usecase:
Create kms-hmac-key-with-params
Request using vesctl:
vesctl configuration create kms_key -i kms_key.yaml
where file kms_key.yaml has following contents (kms_key.CreateRequest):
RequestJSON:
{
"metadata": {
"name": "kms-hmac-key-with-params",
"namespace": "documentation"
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"key_info": {
"hmac_key": {
"params": {
"key_size": 256,
"algo_list": [
"SHA256"
]
}
}
}
}
}
vesctl yaml response:
ResponseJSON:
{
"metadata": {
"name": "kms-hmac-key-with-params",
"namespace": "documentation",
"labels": {},
"annotations": {},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "d4de9777-0791-4576-88ac-a3247c1f2bf1",
"creation_timestamp": "2024-03-21T14:05:56.001257Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {}
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [],
"max_cache_age": null
}
}
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-hmac-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","key_info":{"hmac_key":{"params":{"key_size":256,"algo_list":["SHA256"]}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 717
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:56 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-hmac-key-with-params",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "d4de9777-0791-4576-88ac-a3247c1f2bf1",
"creation_timestamp": "2024-03-21T14:05:56.001257Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null,
"labels": {
}
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [
],
"max_cache_age": null
}
}