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 kmskey.yaml has following contents (kmskey.CreateRequest):
metadata:
name: kms-rsa-key-default
namespace: documentation
spec:
keyInfo:
rsaKey: {}
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: kms-rsa-key-default
namespace: documentation
spec:
policies: []
systemMetadata:
creationTimestamp: "2021-02-22T15:44:06.801750600Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 8af41e23-82be-4ba9-89cd-d37094b7b6aa
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-rsa-key-default","namespace":"documentation"},"spec":{"keyInfo":{"rsaKey":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 695
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:06 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-rsa-key-default",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "8af41e23-82be-4ba9-89cd-d37094b7b6aa",
"creation_timestamp": "2021-02-22T15:44:06.801750600Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"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 kmskey.yaml has following contents (kmskey.CreateRequest):
metadata:
name: kms-rsa-key-with-params
namespace: documentation
spec:
keyInfo:
rsaKey:
params:
ESSchemes:
- RSAES_OAEP
- RSAES_PKCS1_V15
SSASchemes:
- RSASSA_PKCS1_V15
- RSASSA_PSS
hashAlgos:
- SHA256
keySize: 2048
sensitivity: SENSITIVITY_LOW
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: kms-rsa-key-with-params
namespace: documentation
spec:
policies: []
sensitivity: SENSITIVITY_LOW
systemMetadata:
creationTimestamp: "2021-02-22T15:44:06.807176900Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 7022d7d9-80ed-4985-87db-a414258c5c4c
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-rsa-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","keyInfo":{"rsaKey":{"params":{"keySize":2048,"ESSchemes":["RSAES_OAEP","RSAES_PKCS1_V15"],"SSASchemes":["RSASSA_PKCS1_V15","RSASSA_PSS"],"hashAlgos":["SHA256"]}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 696
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:06 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-rsa-key-with-params",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "7022d7d9-80ed-4985-87db-a414258c5c4c",
"creation_timestamp": "2021-02-22T15:44:06.807176900Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"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 kmskey.yaml has following contents (kmskey.CreateRequest):
metadata:
name: kms-aes-key-default
namespace: documentation
spec:
keyInfo:
aesKey: {}
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: kms-aes-key-default
namespace: documentation
spec:
policies: []
systemMetadata:
creationTimestamp: "2021-02-22T15:44:06.811606200Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: ce07d203-8ef7-4c79-a190-765ba6e407ce
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-aes-key-default","namespace":"documentation"},"spec":{"keyInfo":{"aesKey":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 695
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:06 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-aes-key-default",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "ce07d203-8ef7-4c79-a190-765ba6e407ce",
"creation_timestamp": "2021-02-22T15:44:06.811606200Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"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 kmskey.yaml has following contents (kmskey.CreateRequest):
metadata:
name: kms-aes-key-with-params
namespace: documentation
spec:
keyInfo:
aesKey:
params:
keySize: 256
nonceSizeMax: 256
nonceSizeMin: 96
sensitivity: SENSITIVITY_LOW
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: kms-aes-key-with-params
namespace: documentation
spec:
policies: []
sensitivity: SENSITIVITY_LOW
systemMetadata:
creationTimestamp: "2021-02-22T15:44:06.815947300Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: dc615a35-b96a-4b1f-82fd-da0b5fcc8f0c
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-aes-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","keyInfo":{"aesKey":{"params":{"keySize":256,"nonceSizeMin":96,"nonceSizeMax":256}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 696
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:06 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-aes-key-with-params",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "dc615a35-b96a-4b1f-82fd-da0b5fcc8f0c",
"creation_timestamp": "2021-02-22T15:44:06.815947300Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"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 kmskey.yaml has following contents (kmskey.CreateRequest):
metadata:
name: kms-hmac-key-default
namespace: documentation
spec:
keyInfo:
hmacKey: {}
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: kms-hmac-key-default
namespace: documentation
spec:
policies: []
systemMetadata:
creationTimestamp: "2021-02-22T15:44:06.820395300Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: dbb6cc57-f50a-409c-aa5f-2b2bd3a3ff6f
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-hmac-key-default","namespace":"documentation"},"spec":{"keyInfo":{"hmacKey":{}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 696
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:06 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-hmac-key-default",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "dbb6cc57-f50a-409c-aa5f-2b2bd3a3ff6f",
"creation_timestamp": "2021-02-22T15:44:06.820395300Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"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 kmskey.yaml has following contents (kmskey.CreateRequest):
metadata:
name: kms-hmac-key-with-params
namespace: documentation
spec:
keyInfo:
hmacKey:
params:
algoList:
- SHA256
keySize: 256
sensitivity: SENSITIVITY_LOW
vesctl yaml response:
metadata:
annotations: {}
labels: {}
name: kms-hmac-key-with-params
namespace: documentation
spec:
policies: []
sensitivity: SENSITIVITY_LOW
systemMetadata:
creationTimestamp: "2021-02-22T15:44:06.824486600Z"
creatorClass: examplesvc
creatorId: examplesvc
finalizers: []
tenant: acmecorp
uid: 9f9c98db-1e1b-468e-b4a6-0cff4f74a081
Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"kms-hmac-key-with-params","namespace":"documentation"},"spec":{"sensitivity":"SENSITIVITY_LOW","keyInfo":{"hmacKey":{"params":{"keySize":256,"algoList":["SHA256"]}}}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys'
curl response:
HTTP/1.1 200 OK
Content-Length: 697
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:44:06 GMT
Vary: Accept-Encoding
{
"metadata": {
"name": "kms-hmac-key-with-params",
"namespace": "documentation",
"labels": {
},
"annotations": {
},
"description": "",
"disable": false
},
"system_metadata": {
"uid": "9f9c98db-1e1b-468e-b4a6-0cff4f74a081",
"creation_timestamp": "2021-02-22T15:44:06.824486600Z",
"deletion_timestamp": null,
"modification_timestamp": null,
"initializers": null,
"finalizers": [
],
"tenant": "acmecorp",
"creator_class": "examplesvc",
"creator_id": "examplesvc",
"object_index": 0,
"owner_view": null
},
"spec": {
"sensitivity": "SENSITIVITY_LOW",
"policies": [
],
"max_cache_age": null
}
}