The Open Policy Agent (OPA , pronounced "oh-pa") is an open source, general-purpose policy engin that unifies policy enforcement across the stack.
This repository centralize various static and dynamic based policies to demonstrate the power of OPA.
Clone this repostory
git clone https://github.com/fjudith/open-policy-agent-exercices opa-exercices
cd opa-exercices
Create a Python virtual environment
virtualenv .venv
./.venv/bin/activate
pushd "./api/01_basic_flask_restful_api"
pip install -r ./requirements.txt
opa run -s "./apiserver.rego" & \
python "./apiserver.py"
pushd "./api/01_basic_bottle_restful_api"
pip install -r ./requirements.txt
opa run -s "./apiserver.rego" & \
python "./apiserver.py"