-
Notifications
You must be signed in to change notification settings - Fork 1
/
ecommercePolicyTemplateScenario.json
38 lines (38 loc) · 1.4 KB
/
ecommercePolicyTemplateScenario.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"validationMode": "STRICT",
"policyStoreDescription": "Policy store for the Policy Template Scenario, created via avp-cli tool",
"name": "Ecommerce with Policy Template Scenario",
"description": "This scenario demonstrates the use of policy templates and template-linked policies in Amazon Verified Permissions. It allows sellers to list their own products.",
"schemaPath": "./scenarios/ecommercePolicyTemplateScenario/schema.json",
"policyTemplate":
{
"path": "./scenarios/ecommercePolicyTemplateScenario/template_policy.cedar",
"description": "Policy template that allows a seller to list a product"
}
,
"templateLinkedPolicies": [
{
"principal": {
"entityId": "123",
"entityType": "EcommercePlatform::Seller"
},
"resource": {
"entityId": "456",
"entityType": "EcommercePlatform::Product"
},
"description": "Template-linked policy that allows seller 123 to list product 456"
}
],
"tests": [
{
"path": "./scenarios/ecommercePolicyTemplateScenario/allow_test_1.json",
"description": "User 123 is allowed the ability to list (action) product 456 (resource)",
"type": "allow"
},
{
"path": "./scenarios/ecommercePolicyTemplateScenario/deny_test_1.json",
"description": "User 456 is denied the ability to list (action) product 123 (resource)",
"type": "forbid"
}
]
}