-
Notifications
You must be signed in to change notification settings - Fork 1
/
ecommerceContextScenario.json
30 lines (30 loc) · 1.27 KB
/
ecommerceContextScenario.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
{
"validationMode": "STRICT",
"name": "Ecommerce with Context usage Scenario",
"policyStoreDescription": "Policy store for the Context Scenario, created via avp-cli tool",
"description": "This scenario demonstrates the use of context in Amazon Verified Permissions. It allows customers to view products only when they are in the US region.",
"schemaPath": "./scenarios/ecommerceContextScenario/schema.json",
"policies": [
{
"path": "./scenarios/ecommerceContextScenario/allow_policy.cedar",
"description": "Allow viewing of products for customers in the US region"
}
],
"tests": [
{
"path": "./scenarios/ecommerceContextScenario/allow_test_1.json",
"description": "User Bob is allowed the ability to view (action) the basketball (resource), with region us",
"type": "allow"
},
{
"path": "./scenarios/ecommerceContextScenario/deny_test_1.json",
"description": "User Bob is denied the ability to view (action) the basketball (resource), with region eu",
"type": "forbid"
},
{
"path": "./scenarios/ecommerceContextScenario/deny_test_2.json",
"description": "User Bob is denied the ability to view (action) the basketball (resource), with no region specified",
"type": "forbid"
}
]
}