Skip to content

Latest commit

 

History

History

tutorial3App

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

How to run

Install Dependencies

yarn install

Compile Policy to WebAssembly binary

opa build "data.object.document.allow == true" -d "../policies/object/document/allow.rego"

OR

yarn build-wasm

More usage info:

opa build --help

Run

yarn start

You're expected to see the following output from console:

The evaluation result is `true` for the following input: 
{
    "user": {
        "name": "Joe Blogger",
        "roles": [
            {
                "name": "document readers"
            }
        ]
    },
    "document": {
        "classificationLevel": 1,
        "ownerName": "Joe Blogger"
    }
}