-
Notifications
You must be signed in to change notification settings - Fork 1
/
ecommerceBatchScenario.json
59 lines (58 loc) · 2.27 KB
/
ecommerceBatchScenario.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"validationMode": "STRICT",
"policyStoreDescription": "Policy store for the Batch Scenario, created via avp-cli tool",
"name": "Ecommerce with Batch Scenario",
"description": "This scenario demonstrates the use Batch Authorization feature in Amazon Verified Permissions.",
"schemaPath": "./scenarios/ecommerceBatchScenario/schema.json",
"policies": [
{
"path": "./scenarios/ecommerceBatchScenario/allow_policy_1.cedar",
"description": "Allows admin to edit order if status is paid"
},
{
"path": "./scenarios/ecommerceBatchScenario/allow_policy_2.cedar",
"description": "Allows customer to buy and view products"
},
{
"path": "./scenarios/ecommerceBatchScenario/allow_policy_3.cedar",
"description": "Allows customer with premiumMembership to Get Discount and to Preorder"
}
],
"tests": [
{
"path": "./scenarios/ecommerceBatchScenario/allow_test_1.json",
"description": "User Daniel who is an admin, is allowed to edit order as the status is paid.",
"type": "allow"
},
{
"path": "./scenarios/ecommerceBatchScenario/allow_test_2.json",
"description": "User Tom who is a customer, is allowed to view any product.",
"type": "allow"
},
{
"path": "./scenarios/ecommerceBatchScenario/allow_test_3.json",
"description": "User Ken who is a customer with premiumMembership, is allowed to GetDiscount on product.",
"type": "allow"
},
{
"path": "./scenarios/ecommerceBatchScenario/deny_test_1.json",
"description": "User Daniel who is a customer, is denied to edit order.",
"type": "forbid"
},
{
"path": "./scenarios/ecommerceBatchScenario/deny_test_2.json",
"description": "User Ken who is a customer without premiumMembership, is denied to GetDiscount on product.",
"type": "forbid"
}
],
"batchTests": [
{
"path": "./scenarios/ecommerceBatchScenario/multiple_actions_batch_test.json",
"description": "Checking multiple actions for a single principal (For specific product, what actions can be taken by Ken)"
},
{
"path": "./scenarios/ecommerceBatchScenario/multiple_resource_batch_test.json",
"description": "Checking multiple resources, to check which orders can admin edit."
}
]
}