The command should read all the audit (decision) logs from Permit API and run them against a running PDP to print the diff log between the check functions
Implementation Details
- The command is
permit test run audit
- Command should accept the following arguments as filter arguments for the audit logs:
--time-frame a number of hours to fetch the audit logs (between 6 to 72) - default to 24
--source-pdp is an ID of the PDP to filter the audit logs from. In case not provided, will take from all the PDPs
--users comma-separated list of users to filter the logs
--resources comma-separated list of users to filter the logs
--tenant a tenant to filter the logs
--action an action to filter the logs
--decision a decision
- The
--pdp-url argument is the URL that the check function will run against. Default is http://localhost:7766
- The command flow is:
- In case no arguments are presented, the command should run with default values and show the diff
- In case there's a PDP error (not running or not available) the command should fail in the first check and not try to run all the checks
Edge Cases (for PR screencast)
- Happy flow with no arguments and PDP up and running
- No argument and
pdp-url isn't reachable
- Happy flow with some filter arguments (better all arguments)
- Failed flow with bad argument values
- Failed flow with non-existing
source-pdp
💡 Before participating in the issue or offering a bounty, please make sure you carefully read the contribution guidelines. PRs that do not adhere to the guidelines will be closed with no further notice.
The command should read all the audit (decision) logs from Permit API and run them against a running PDP to print the diff log between the check functions
Implementation Details
permit test run audit--time-framea number of hours to fetch the audit logs (between 6 to 72) - default to 24--source-pdpis an ID of the PDP to filter the audit logs from. In case not provided, will take from all the PDPs--userscomma-separated list of users to filter the logs--resourcescomma-separated list of users to filter the logs--tenanta tenant to filter the logs--actionan action to filter the logs--decisiona decision--pdp-urlargument is the URL that the check function will run against. Default is http://localhost:7766Edge Cases (for PR screencast)
pdp-urlisn't reachablesource-pdp💡 Before participating in the issue or offering a bounty, please make sure you carefully read the contribution guidelines. PRs that do not adhere to the guidelines will be closed with no further notice.