doorman icon indicating copy to clipboard operation
doorman copied to clipboard

Simulate authorization requests

Open leplatrem opened this issue 7 years ago • 1 comments

  • Something like /__simulate__
  • Post principals without JWT verification
  • Basic Web UI

leplatrem avatar Nov 21 '17 11:11 leplatrem

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

leplatrem avatar Dec 04 '17 22:12 leplatrem