ves-io-schema-tpm_provision-CustomAPI-Provision

Examples of performing tpm_provision CustomAPI Provision

Usecase:

Provision TPM certificate

Request:

Request using vesctl:

vesctl request rpc tpm_provision.CustomAPI.Provision -i request.yaml --uri /public/tpm/provision --http-method POST

where file request.yaml has following contents:

akPubKey: ImwkkIsdMsYSLyMMG/u7IHR9eGD1QJV4tPSzSzX+3LPB2fBLJrYEaSoM218WIsFyZMFmmIwvEDJm4RXTyb8A
apiKey: lgwo23f23mG
csr: 0T8mSkaiPdIWbB5m5bUMRIjZUsP2+lgoOwiYtGLPfxt5TqIRnJkjLmPQkBhHEx6ZyW0nQuC5Q2nJLCs3bLLbg
device:
  name: IGW
  serial: ABCDEF123456Z
  vendor: Volterra
  version: R0B
ekCert: jvNpfJf4+tZQ8fkEFpjCZt5IIlaMqPI8y7CZKE3bkIcKPYpQZTkSLaaLDDh8ZJgXpjuuKDWpqKvOWo8daej9
ekPubKey: iXgnZML38xQ7bAO1LFjCMSI0IfFvFJ2z5YhOlzFOhilcE1GHlsLOWyI9hZYczT+ZN0gitgR9ZELEoLxzVVImbc1T

vesctl yaml response:

{}

Request using curl:

curl -X 'POST' -d '{"apiKey":"lgwo23f23mG","ekCert":"jvNpfJf4+tZQ8fkEFpjCZt5IIlaMqPI8y7CZKE3bkIcKPYpQZTkSLaaLDDh8ZJgXpjuuKDWpqKvOWo8daej9","ekPubKey":"iXgnZML38xQ7bAO1LFjCMSI0IfFvFJ2z5YhOlzFOhilcE1GHlsLOWyI9hZYczT+ZN0gitgR9ZELEoLxzVVImbc1T","akPubKey":"ImwkkIsdMsYSLyMMG/u7IHR9eGD1QJV4tPSzSzX+3LPB2fBLJrYEaSoM218WIsFyZMFmmIwvEDJm4RXTyb8A","csr":"0T8mSkaiPdIWbB5m5bUMRIjZUsP2+lgoOwiYtGLPfxt5TqIRnJkjLmPQkBhHEx6ZyW0nQuC5Q2nJLCs3bLLbg","device":{"name":"IGW","vendor":"Volterra","version":"R0B","serial":"ABCDEF123456Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/tpm/tpm/provision'

curl response:

HTTP/1.1 200 OK
Content-Length: 71
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:37 GMT
Vary: Accept-Encoding

{
  "encrypted_ak_cert": "",
  "credential_bundle": "",
  "nonce": ""
}