Skip to content

Latest commit

 

History

History

human-resources-app-model

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Multi-tenancy Authorization Pattern Code Example

Prerequisites

  1. Install the Oso Cloud CLI client.
  2. Set the OSO_AUTH environment variable to your Oso Cloud API key (Get an API Key).

Understanding the Model

Read the tutorial Writing Your First Policy. It discusses this multi-tenancy example in more detail.

Running the Examples

Run the test script in this example's folder ./tests/policy-tests.sh.

> ./tests/policy-tests.sh

The script will:

  1. Upload the policy file ./policy.polar
  2. Upload a set of facts to Oso Cloud (facts are defined in the script)
  3. Perform various authorization checks against the policy, facts, and context facts.