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: "2021-06-02T10:20:43.528110096Z"
  policy:
    allowedUsers:
    - email: test-user2@customer1.com
      tenant: customer1
    - email: test-user1@customer2.com
      tenant: customer2
    expirationTimestamp: "2021-06-09T10:20:43.528108590Z"
  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":"2021-06-02T10:20:43.528110096Z","policy":{"allowedUsers":[{"email":"test-user2@customer1.com","tenant":"customer1"},{"email":"test-user1@customer2.com","tenant":"customer2"}],"expirationTimestamp":"2021-06-09T10:20:43.528108590Z"}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186462253_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, 02 Jun 2021 10:22:59 GMT
Vary: Accept-Encoding

{
  "blinded_key_base64": ""
}