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: "2021-09-01T09:02:25.547983737Z"
secretName: test-secret

vesctl yaml response:

policyDocument:
  author:
    email: test-user@customer1.com
    tenant: customer1
  blindfoldKeyVersion: 1
  creationTime: "2021-08-25T09:04:41.057140357Z"
  policy:
    allowedUsers:
    - email: test-user2@customer1.com
      tenant: customer1
    - email: test-user1@customer2.com
      tenant: customer2
    expirationTimestamp: "2021-09-01T09:02:25.547983737Z"
  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":"2021-09-01T09:02:25.547983737Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_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, 25 Aug 2021 09:04:41 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": "2021-08-25T09:04:41.057140357Z",
    "policy": {
      "allowed_users": [
        {
          "email": "test-user2@customer1.com",
          "tenant": "customer1"
        },
        {
          "email": "test-user1@customer2.com",
          "tenant": "customer2"
        }
      ],
      "expiration_timestamp": "2021-09-01T09:02:25.547983737Z"
    }
  },
  "policy_document_hmac_base64": "",
  "public_key": ""
}