Skip to main content
Version: 1.1

Examples

In this section we discuss some contextual authorization evaluation examples.

We are going to describe three distinct examples of query requests and for each request sent to the contextual authorization query API endpoints, we are going to enlist the 3 response types (AST, JSON, TEXT) that the API can return.

Policy

For this example we are going to use an ABC bank authorization policy for accessing customer records, with the following rules:

  • An investment banker can read their own customer records once located remotely.
  • An investment banker can read, create, update customer records once located in office.
  • A group manager can read, create, update customer records regardless the location.
  • An employee has no access at customer records.

Authorization domain file

For the aforementioned policy we use the abcbank.yml domain file that is provided in the Additional Resources section in Authorization domain file.

Set the domain property in your deployment file to the sample authorization domain file abcbank.yml as shown below:

domain: '<path_to_file>/abcbank.yml'