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: "2024-03-28T14:04:17.181724Z"
secretName: test-secret
vesctl yaml response:
policyDocument:
author:
email: test-user@customer1.com
tenant: customer1
blindfoldKeyVersion: 1
creationTime: "2024-03-21T14:09:08.629207Z"
policy:
allowedUsers:
- email: test-user2@customer1.com
tenant: customer1
- email: test-user1@customer2.com
tenant: customer2
expirationTimestamp: "2024-03-28T14:04:17.181724Z"
policyId: "24"
secretName: test-secret
Request using curl:
curl -X 'POST' -d '{"secret_name":"test-secret","policy":{"allowed_users":[{"email":"test-user2@customer1.com","tenant":"customer1"},{"email":"test-user1@customer2.com","tenant":"customer2"}],"expiration_timestamp":"2024-03-28T14:04:17.181724Z"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/secret_management/namespaces/system/voltshare/process_policy_information'
curl response:
HTTP/1.1 200 OK
Content-Length: 636
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:09:08 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": "2024-03-21T14:09:08.629207Z",
"policy": {
"allowed_users": [
{
"email": "test-user2@customer1.com",
"tenant": "customer1"
},
{
"email": "test-user1@customer2.com",
"tenant": "customer2"
}
],
"expiration_timestamp": "2024-03-28T14:04:17.181724Z"
}
},
"policy_document_hmac_base64": "",
"public_key": ""
}