ves-io-schema-voltshare-CustomAPI-ProcessPolicyInformation

Examples of performing voltshare CustomAPI ProcessPolicyInformation

Usecase:

Process Policy Information

Request:

Request using vesctl:

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

where file request.yaml has following contents:

policy:
  allowedUsers:
  - email: test-user2@customer1.com
    tenant: customer1
  - email: test-user1@customer2.com
    tenant: customer2
  expirationTimestamp: "2020-09-30T09:52:55.083799800Z"
secretName: test-secret

vesctl yaml response:

policyDocument:
  author:
    email: test-user@customer1.com
    tenant: customer1
  blindfoldKeyVersion: 1
  creationTime: "2020-09-23T09:54:24.199069300Z"
  policy:
    allowedUsers:
    - email: test-user2@customer1.com
      tenant: customer1
    - email: test-user1@customer2.com
      tenant: customer2
    expirationTimestamp: "2020-09-30T09:52:55.083799800Z"
  policyId: "24"
  secretName: test-secret

Request using curl:

curl -X 'POST' -d '{"secretName":"test-secret","policy":{"allowedUsers":[{"email":"test-user2@customer1.com","tenant":"customer1"},{"email":"test-user1@customer2.com","tenant":"customer2"}],"expirationTimestamp":"2020-09-30T09:52:55.083799800Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build823219857_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/secret_management/namespaces/system/voltshare/process_policy_information'

curl response:

HTTP/1.1 200 OK
Content-Length: 642
Content-Type: application/json
Date: Wed, 23 Sep 2020 09:54:24 GMT
Vary: Accept-Encoding

{
  "policy_document": {
    "author": {
      "email": "test-user@customer1.com",
      "tenant": "customer1"
    },
    "policy_id": "24",
    "secret_name": "test-secret",
    "blindfold_key_version": 1,
    "creation_time": "2020-09-23T09:54:24.199069300Z",
    "policy": {
      "allowed_users": [
        {
          "email": "test-user2@customer1.com",
          "tenant": "customer1"
        },
        {
          "email": "test-user1@customer2.com",
          "tenant": "customer2"
        }
      ],
      "expiration_timestamp": "2020-09-30T09:52:55.083799800Z"
    }
  },
  "policy_document_hmac_base64": "",
  "public_key": ""
}