ves-io-schema-voltshare-CustomAPI-DecryptSecret

Examples of performing voltshare CustomAPI DecryptSecret

Usecase:

Decrypt Secret

Request:

Request using vesctl:

vesctl request rpc voltshare.CustomAPI.DecryptSecret -i request.yaml --uri /public/namespaces/system/voltshare/decrypt_secret --http-method POST

where file request.yaml has following contents:

policyDocument:
  author:
    email: test-user@customer1.com
    tenant: customer1
  blindfoldKeyVersion: 1
  creationTime: "2020-09-16T10:49:55.062419900Z"
  policy:
    allowedUsers:
    - email: test-user2@customer1.com
      tenant: customer1
    - email: test-user1@customer2.com
      tenant: customer2
    expirationTimestamp: "2020-09-23T10:49:55.062408400Z"
  policyId: "24"
  secretName: google-api-key

vesctl yaml response:

{}

Request using curl:

curl -X 'POST' -d '{"policyDocument":{"author":{"email":"test-user@customer1.com","tenant":"customer1"},"policyId":"24","secretName":"google-api-key","blindfoldKeyVersion":1,"creationTime":"2020-09-16T10:49:55.062419900Z","policy":{"allowedUsers":[{"email":"test-user2@customer1.com","tenant":"customer1"},{"email":"test-user1@customer2.com","tenant":"customer2"}],"expirationTimestamp":"2020-09-23T10:49:55.062408400Z"}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/secret_management/namespaces/system/voltshare/decrypt_secret'

curl response:

HTTP/1.1 200 OK
Content-Length: 30
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:51:10 GMT
Vary: Accept-Encoding

{
  "blinded_key_base64": ""
}