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: "2020-05-15T10:52:42.902905636Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 948498a9-3585-45e7-a65c-a624a234a7fc

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-build144460626_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: 692
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-rsa-key-default",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "948498a9-3585-45e7-a65c-a624a234a7fc",
    "creation_timestamp": "2020-05-15T10:52:42.902905636Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "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: "2020-05-15T10:52:42.906766044Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: b196a749-cda9-43af-ae20-f4ff197bb4dc

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-build144460626_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: 693
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-rsa-key-with-params",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "b196a749-cda9-43af-ae20-f4ff197bb4dc",
    "creation_timestamp": "2020-05-15T10:52:42.906766044Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "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: "2020-05-15T10:52:42.911873949Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 9412ae64-9e38-474c-b370-19a0f8253fcd

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-build144460626_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: 692
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-aes-key-default",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "9412ae64-9e38-474c-b370-19a0f8253fcd",
    "creation_timestamp": "2020-05-15T10:52:42.911873949Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "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: "2020-05-15T10:52:42.914722337Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 3bab148c-dfff-4303-b968-8eaff3e35fb9

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-build144460626_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: 693
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-aes-key-with-params",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "3bab148c-dfff-4303-b968-8eaff3e35fb9",
    "creation_timestamp": "2020-05-15T10:52:42.914722337Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "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: "2020-05-15T10:52:42.917210321Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 968f7475-793d-4fd6-96e0-eb36b5efcf53

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-build144460626_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: 693
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-hmac-key-default",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "968f7475-793d-4fd6-96e0-eb36b5efcf53",
    "creation_timestamp": "2020-05-15T10:52:42.917210321Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "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: "2020-05-15T10:52:42.919940128Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 9812a817-864b-47ed-84aa-ed0936821b5d

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-build144460626_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: 694
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:42 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "kms-hmac-key-with-params",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "9812a817-864b-47ed-84aa-ed0936821b5d",
    "creation_timestamp": "2020-05-15T10:52:42.919940128Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "sensitivity": "SENSITIVITY_LOW",
    "policies": [
    ],
    "max_cache_age": null
  }
}