https://github.com/fjudith/open-policy-agent-exercices
https://github.com/fjudith/open-policy-agent-exercices
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fjudith/open-policy-agent-exercices
- Owner: fjudith
- Created: 2021-03-03T00:20:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-05T23:42:58.000Z (over 4 years ago)
- Last Synced: 2025-02-15T01:28:26.255Z (4 months ago)
- Language: Python
- Size: 595 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/fjudith/open-policy-agent-exercices/actions/workflows/api_container_images.yaml)
# Open Policy Agent Examples
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.
### Running exercises
Clone this repostory
```bash
git clone https://github.com/fjudith/open-policy-agent-exercices opa-exercices
cd opa-exercices
```Create a Python virtual environment
```bash
virtualenv .venv
./.venv/bin/activate
```## API
[based basic RESTFul API](./api/01_basic_flask_restful_api/)
```bash
pushd "./api/01_basic_flask_restful_api"
pip install -r ./requirements.txt
opa run -s "./apiserver.rego" & \
python "./apiserver.py"
```
[based basic RESTFul API](./api/01_basic_flask_restful_api/)
```bash
pushd "./api/01_basic_bottle_restful_api"
pip install -r ./requirements.txt
opa run -s "./apiserver.rego" & \
python "./apiserver.py"
```