Open leplatrem opened 7 years ago
Idea:
Provide test files that would be executed out of the http request/response. They could be define in YAML as well (and even as part of the same file as policies)
POLICIES=policies.yaml doorman test
# policies.yaml
policies:
- ...
tests:
-
principals:
- userid: ldap|alice
- group:hris_staff
action: create
resource: pto
policy: staff-create-pto
allowed: true
-
principals:
- userid: ldap|alice
action: delete
resource: article
allowed: false
-
principals:
- userid: ldap|alice
action: delete
resource: article
context:
roles:
- author
allowed: false
/__simulate__