Testing out opa
- docker
- docker-compose
- opa cli (optional)
- https://www.openpolicyagent.org/docs/latest/#running-opa
- https://www.openpolicyagent.org/docs/latest/deployments/
- https://play.openpolicyagent.org/
First you will need to get OPA running locally. For this we will use docker-compose to make sure things are nice and simple
docker-compose up -d
if you would like to start from scratch
docker-compose down
Then test that it is up and running
curl localhost:8500/v1/data/foo/bar
> {}
We can use the OPA Rest API to upload our policies via
curl -X PUT localhost:8500/v1/policies/{id} --data-binary "@example.rego"
And if you would like to check the current state of a policy
curl localhost:8500/v1/policies/{id}
or delete the polict
curl -X DELETE localhost:8500/v1/policies/{id}