oso allows you to write policy as code, tightly integrated with application code, logic, and data, and provides a simple way to enforce authorization on all requests.
This repository contains an example application discussed on our blog.
-
Install python requirements, using Python 3.
pip install -r requirements.txt
-
Load fixture data.
python -m app.fixtures
-
Run the app:
$ FLASK_RUN_EXTRA_FILES=app/policy.polar FLASK_DEBUG=1 flask run
-
Visit http://localhost:5000/graphql and make some queries.
-
Go to http://localhost:5000/sql to see the SQL used in the prior query.