- Install the Oso Cloud CLI client.
- Set the
OSO_AUTH
environment variable to your Oso Cloud API key (Get an API Key).
Read the tutorial Writing Your First Policy. It discusses this multi-tenancy example in more detail.
Run the test script in this example's folder ./tests/policy-tests.sh
.
> ./tests/policy-tests.sh
The script will:
- Upload the policy file
./policy.polar
- Upload a set of facts to Oso Cloud (facts are defined in the script)
- Perform various authorization checks against the policy, facts, and context facts.