deptofdefense / iceberg

File server using client certificate authentication and policy-based access control
MIT License
7 stars 6 forks source link

Simulate Requests #13

Closed pjdufour-dds closed 4 years ago

pjdufour-dds commented 4 years ago

In order to provide better testing of policies during blue/green deployment, we should add a command to support simulating a request that returns the result of "allow" or "deny". See usage below.

$ iceberg simulate \
--access-policy policy.json \
--user "/C=US/O=Atlantis/OU=Atlantis Digital Service/OU=CONTRACTOR/CN=LAST.FIRST.MIDDLE.ID" \
--path "/allowed/123.abc"
allow

$ iceberg simulate \
--access-policy policy.json \
--user "/C=US/O=Atlantis/OU=Atlantis Digital Service/OU=CONTRACTOR/CN=LAST.FIRST.MIDDLE.ID" \
--path "/denied/123.abc"
deny