Maggie Walker
01/09/2023, 9:00 PMmichelle x account_d6455851-3f86-48d8-b102-8d996eb92645
which I didn't think I was testing yet
---
name: AccountTestSuite
description: Tests for verifying the account resource policy
options:
now: "2022-08-02T15:00:00Z"
tests:
- name: Accessing an album
options:
now: "2022-08-03T15:00:00Z"
input:
principals:
- michelle
- elaine
resources:
- account_1
- account_053a1a75-acc5-4cd8-9206-a194335d2afa
- account_d6455851-3f86-48d8-b102-8d996eb92645
actions:
- view
- edit
expected:
- principal: michelle
resource: account_1
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
- principal: michelle
resource: account_053a1a75-acc5-4cd8-9206-a194335d2afa
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
- principal: elaine
resource: account_1
actions:
view: EFFECT_DENY
edit: EFFECT_DENY
- principal: elaine
resource: account_d6455851-3f86-48d8-b102-8d996eb92645
actions:
view: EFFECT_DENY
edit: EFFECT_DENY
Dennis (Cerbos)
01/09/2023, 9:17 PMSpecifically I am getting a test result forThis combination is tested by an implicit test. The test framework tests each combination of principals, resources and actions. The default outcome expectation ismichelle x account_d6455851-3f86-48d8-b102-8d996eb92645
EFFECT_DENY
. The expected
section can be used to specify the outcome (if it is different from the default).Maggie Walker
01/09/2023, 9:46 PMprincipal
block for each resource
- principal: michelle
resource: account_1
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
- principal: michelle
resource: account_053a1a75-acc5-4cd8-9206-a194335d2afa
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
- principal: michelle
resource: account_d6455851-3f86-48d8-b102-8d996eb92645
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
or can I combine like:
- principal: michelle
resource: account_1
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
resource: account_053a1a75-acc5-4cd8-9206-a194335d2afa
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
resource: account_d6455851-3f86-48d8-b102-8d996eb92645
actions:
view: EFFECT_ALLOW
edit: EFFECT_ALLOW
Charith (Cerbos)
01/10/2023, 4:10 PMMaggie Walker
01/10/2023, 4:26 PM