diff options
Diffstat (limited to 'test/policies/data')
-rw-r--r-- | test/policies/data/abac/data.json | 94 | ||||
-rw-r--r-- | test/policies/data/account/data.json | 16 | ||||
-rw-r--r-- | test/policies/data/action/data.json | 43 | ||||
-rw-r--r-- | test/policies/data/organization/data.json | 32 | ||||
-rw-r--r-- | test/policies/data/role/data.json | 63 |
5 files changed, 248 insertions, 0 deletions
diff --git a/test/policies/data/abac/data.json b/test/policies/data/abac/data.json new file mode 100644 index 0000000..77b5668 --- /dev/null +++ b/test/policies/data/abac/data.json @@ -0,0 +1,94 @@ +{ + "sensor_data": [ + { + "id": "0001", + "location": "Sri Lanka", + "temperature": "28 C", + "precipitation": "1000 mm", + "windspeed": "5.5 m/s", + "humidity": "40%", + "particle_density": "1.3 g/l", + "timestamp": "2024-02-26" + }, + { + "id": "0002", + "location": "Colombo", + "temperature": "30 C", + "precipitation": "1200 mm", + "windspeed": "6.0 m/s", + "humidity": "45%", + "particle_density": "1.5 g/l", + "timestamp": "2024-02-26" + }, + { + "id": "0003", + "location": "Kandy", + "temperature": "25 C", + "precipitation": "800 mm", + "windspeed": "4.5 m/s", + "humidity": "60%", + "particle_density": "1.1 g/l", + "timestamp": "2024-02-26" + }, + { + "id": "0004", + "location": "Galle", + "temperature": "35 C", + "precipitation": "500 mm", + "windspeed": "7.2 m/s", + "humidity": "30%", + "particle_density": "1.8 g/l", + "timestamp": "2024-02-27" + }, + { + "id": "0005", + "location": "Jaffna", + "temperature": "-5 C", + "precipitation": "300 mm", + "windspeed": "3.8 m/s", + "humidity": "20%", + "particle_density": "0.9 g/l", + "timestamp": "2024-02-27" + }, + { + "id": "0006", + "location": "Trincomalee", + "temperature": "20 C", + "precipitation": "1000 mm", + "windspeed": "5.0 m/s", + "humidity": "55%", + "particle_density": "1.2 g/l", + "timestamp": "2024-02-28" + }, + { + "id": "0007", + "location": "Nuwara Eliya", + "temperature": "25 C", + "precipitation": "600 mm", + "windspeed": "4.0 m/s", + "humidity": "50%", + "particle_density": "1.3 g/l", + "timestamp": "2024-02-28" + }, + { + "id": "0008", + "location": "Anuradhapura", + "temperature": "28 C", + "precipitation": "700 mm", + "windspeed": "5.8 m/s", + "humidity": "40%", + "particle_density": "1.4 g/l", + "timestamp": "2024-02-29" + }, + { + "id": "0009", + "location": "Matara", + "temperature": "32 C", + "precipitation": "900 mm", + "windspeed": "6.5 m/s", + "humidity": "65%", + "particle_density": "1.6 g/l", + "timestamp": "2024-02-29" + } + ] +} diff --git a/test/policies/data/account/data.json b/test/policies/data/account/data.json new file mode 100644 index 0000000..df263d3 --- /dev/null +++ b/test/policies/data/account/data.json @@ -0,0 +1,16 @@ +{ + "account_attributes":{ + "11111":{ + "owner":"alice", + "amount":10000 + }, + "22222":{ + "owner":"bob", + "amount":10000 + }, + "33333":{ + "owner":"cam", + "amount":10000 + } + } +} diff --git a/test/policies/data/action/data.json b/test/policies/data/action/data.json new file mode 100644 index 0000000..99145b7 --- /dev/null +++ b/test/policies/data/action/data.json @@ -0,0 +1,43 @@ +{ + "user_roles": { + "alice": [ + "admin" + ], + "bob": [ + "editor" + ], + "charlie": [ + "viewer" + ] + }, + "role_permissions": { + "admin": { + "actions": [ + "read", + "write", + "delete" + ], + "resources": [ + "server", + "database" + ] + }, + "editor": { + "actions": [ + "read", + "write" + ], + "resources": [ + "server" + ] + }, + "viewer": { + "actions": [ + "read" + ], + "resources": [ + "server" + ] + } + } +} diff --git a/test/policies/data/organization/data.json b/test/policies/data/organization/data.json new file mode 100644 index 0000000..35fe4a1 --- /dev/null +++ b/test/policies/data/organization/data.json @@ -0,0 +1,32 @@ +{ + "acls": [ + { + "user": "alice", + "actions": [ + "edit", + "read" + ], + "component": "component_A", + "project": "project_A", + "organization": "org_A" + }, + { + "user": "bob", + "actions": ["read"], + "organization": "org_A" + }, + { + "user": "bob", + "action": ["edit"], + "component": "component_A", + "project": "project_B", + "organization": "org_A" + }, + { + "user": "charlie", + "action": ["read"], + "project": "project_B", + "organization": "org_A" + } + ] +} diff --git a/test/policies/data/role/data.json b/test/policies/data/role/data.json new file mode 100644 index 0000000..88ac41b --- /dev/null +++ b/test/policies/data/role/data.json @@ -0,0 +1,63 @@ +{ + "user_roles": { + "alice": [ + "admin" + ], + "bob": [ + "employee", + "billing" + ], + "eve": [ + "customer" + ] + }, + "role_grants": { + "customer": [ + { + "action": "read", + "type": "dog" + }, + { + "action": "read", + "type": "cat" + }, + { + "action": "adopt", + "type": "dog" + }, + { + "action": "adopt", + "type": "cat" + } + ], + "employee": [ + { + "action": "read", + "type": "dog" + }, + { + "action": "read", + "type": "cat" + }, + { + "action": "update", + "type": "dog" + }, + { + "action": "update", + "type": "cat" + } + ], + "billing": [ + { + "action": "read", + "type": "finance" + }, + { + "action": "update", + "type": "finance" + } + ] + } +} + |