diff --git a/static/assets/templates/api-auth.json b/static/assets/templates/api-auth.json index 27e9863..686d79f 100644 --- a/static/assets/templates/api-auth.json +++ b/static/assets/templates/api-auth.json @@ -16,7 +16,8 @@ "api-auth/api-auth-relations.json" ], "assertions": [ - "api-auth/test/api-auth_assertions.json" + "api-auth/test/api-auth_assertions.json", + "api-auth/test/api-auth_decision.json" ] } } diff --git a/static/assets/templates/api-auth/test/api-auth_decisions.json b/static/assets/templates/api-auth/test/api-auth_decisions.json new file mode 100644 index 0000000..db908e3 --- /dev/null +++ b/static/assets/templates/api-auth/test/api-auth_decisions.json @@ -0,0 +1,788 @@ +{ + "assertions": [ + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:DELETE:/v1/todos/{todoId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:DELETE:/v1/todos/{todoId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:DELETE:/v1/todos/{todoId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:DELETE:/v1/todos/{todoId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:DELETE:/v1/todos/{todoId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:GET:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:GET:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:GET:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:GET:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:GET:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:POST:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:POST:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:POST:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:POST:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "todo:POST:/v1/todos", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick-and-morty:GET:/v1/characters", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick-and-morty:GET:/v1/characters", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick-and-morty:GET:/v1/characters", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick-and-morty:GET:/v1/characters", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick-and-morty:GET:/v1/characters", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:GET:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:GET:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:GET:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:GET:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:GET:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:POST:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:POST:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:POST:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:POST:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:POST:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:DELETE:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:DELETE:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:DELETE:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:DELETE:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "petstore:DELETE:/pet/{petId}", + "object_type": "endpoint", + "relation": "can_invoke" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + } + ] +} \ No newline at end of file diff --git a/static/assets/templates/gdrive.json b/static/assets/templates/gdrive.json index 806e758..8c9916e 100644 --- a/static/assets/templates/gdrive.json +++ b/static/assets/templates/gdrive.json @@ -16,7 +16,8 @@ "gdrive/gdrive_relations.json" ], "assertions": [ - "gdrive/test/gdrive_assertions.json" + "gdrive/test/gdrive_assertions.json", + "gdrive/test/gdrive_decisions.json" ] } } diff --git a/static/assets/templates/gdrive/test/gdrive_decisions.json b/static/assets/templates/gdrive/test/gdrive_decisions.json new file mode 100644 index 0000000..c5160f0 --- /dev/null +++ b/static/assets/templates/gdrive/test/gdrive_decisions.json @@ -0,0 +1,4200 @@ +{ + "assertions": [ + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "root", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "summer", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "jerry", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared", + "object_type": "folder", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "secrets", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "groceries", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "rick.inventions", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_share" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "morty.shared.notes", + "object_type": "doc", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + } + ] +} \ No newline at end of file diff --git a/static/assets/templates/github.json b/static/assets/templates/github.json index 52a836d..0359058 100644 --- a/static/assets/templates/github.json +++ b/static/assets/templates/github.json @@ -16,7 +16,8 @@ "github/github_relations.json" ], "assertions": [ - "github/test/github_assertions.json" + "github/test/github_assertions.json", + "github/test/github_decisions.json" ] } } diff --git a/static/assets/templates/github/test/github_decisions.json b/static/assets/templates/github/test/github_decisions.json new file mode 100644 index 0000000..49f6771 --- /dev/null +++ b/static/assets/templates/github/test/github_decisions.json @@ -0,0 +1,253 @@ +{ + "assertions": [ + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_triage" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_triage" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.budget", + "object_type": "repo", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel.missions", + "object_type": "repo", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel.missions", + "object_type": "repo", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel.missions", + "object_type": "repo", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + } + ] +} \ No newline at end of file diff --git a/static/assets/templates/multi-tenant.json b/static/assets/templates/multi-tenant.json index c88c4be..8227d09 100644 --- a/static/assets/templates/multi-tenant.json +++ b/static/assets/templates/multi-tenant.json @@ -16,7 +16,8 @@ "multi-tenant/multi-tenant-relations.json" ], "assertions": [ - "multi-tenant/test/multi-tenant_assertions.json" + "multi-tenant/test/multi-tenant_assertions.json", + "multi-tenant/test/multi-tenant_decisions.json" ] } } diff --git a/static/assets/templates/multi-tenant/test/multi-tenant_decisions.json b/static/assets/templates/multi-tenant/test/multi-tenant_decisions.json new file mode 100644 index 0000000..fb56837 --- /dev/null +++ b/static/assets/templates/multi-tenant/test/multi-tenant_decisions.json @@ -0,0 +1,5211 @@ +{ + "assertions": [ + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "can_create_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "can_create_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "can_create_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "can_create_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "can_create_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "system", + "object_type": "system", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "editor" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "viewer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_administer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_edit" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_view" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_manage_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_list_members" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_leave_tenant" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_create_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_delete_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_write_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "can_read_resources" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel-adventures", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "owner" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "reader" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_delete" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_write" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths-budget", + "object_type": "resource", + "relation": "can_read" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "system", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "citadel", + "object_type": "tenant", + "relation": "system" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "system", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "tenant", + "relation": "system" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + } + ] +} \ No newline at end of file diff --git a/static/assets/templates/simple-rbac.json b/static/assets/templates/simple-rbac.json index 2f22b3a..7fcca18 100644 --- a/static/assets/templates/simple-rbac.json +++ b/static/assets/templates/simple-rbac.json @@ -15,6 +15,9 @@ "simple-rbac/simple-rbac_objects.json", "simple-rbac/simple-rbac_relations.json" ], - "assertions": [] + "assertions": [ + "simple-rbac/assertions.json", + "simple-rbac/decisions.json" + ] } } diff --git a/static/assets/templates/simple-rbac/assertions.json b/static/assets/templates/simple-rbac/assertions.json index 827445b..84fe749 100644 --- a/static/assets/templates/simple-rbac/assertions.json +++ b/static/assets/templates/simple-rbac/assertions.json @@ -1,12 +1,12 @@ { "assertions": [ { - "check_relation": { + "check": { "subject_type": "user", "subject_id": "rick@the-citadel.com", + "relation": "member", "object_type": "group", - "object_id": "admin", - "relation": "member" + "object_id": "admin" }, "expected": true } diff --git a/static/assets/templates/simple-rbac/decisions.json b/static/assets/templates/simple-rbac/decisions.json new file mode 100644 index 0000000..1974e2b --- /dev/null +++ b/static/assets/templates/simple-rbac/decisions.json @@ -0,0 +1,27 @@ +{ + "assertions": [ + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "admin", + "object_type": "group", + "relation": "member" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + } + ] +} \ No newline at end of file diff --git a/static/assets/templates/slack.json b/static/assets/templates/slack.json index 90fcbac..29467f8 100644 --- a/static/assets/templates/slack.json +++ b/static/assets/templates/slack.json @@ -16,7 +16,8 @@ "slack/slack_relations.json" ], "assertions": [ - "slack/test/slack_assertions.json" + "slack/test/slack_assertions.json", + "slack/test/slack_decisions.json" ] } } diff --git a/static/assets/templates/slack/test/slack_decisions.json b/static/assets/templates/slack/test/slack_decisions.json new file mode 100644 index 0000000..151f8e6 --- /dev/null +++ b/static/assets/templates/slack/test/slack_decisions.json @@ -0,0 +1,162 @@ +{ + "assertions": [ + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "rick@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "workspace", + "relation": "channels_admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "jerry@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths", + "object_type": "workspace", + "relation": "channels_admin" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.citadel", + "object_type": "channel", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.citadel", + "object_type": "channel", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "morty@the-citadel.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.gossip", + "object_type": "channel", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "beth@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.general", + "object_type": "channel", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + }, + "expected": true + }, + { + "check_decision": { + "policy_context": { + "path": "rebac.check", + "decisions": [ + "allowed" + ] + }, + "identity_context": { + "identity": "summer@the-smiths.com", + "type": "IDENTITY_TYPE_SUB" + }, + "resource_context": { + "object_id": "smiths.general", + "object_type": "channel", + "relation": "writer" + }, + "policy_instance": { + "name": "policy-rebac" + } + } + } + ] +} \ No newline at end of file