wget https://openpolicyagent.org/downloads/latest/opa_windows_amd64.exeFirst, create your policy files in .rego and place them in ./bundles directory.
Now build the .rego file with opa executable command (opa.exe).
opa build bundles/Example.regoopa build opa/policies/ -o opa/bundles/bundle.tar.gzthis will generate ./bundles/bundles.tar.gz file that will be mounted to nginx web server, where opa engine will read the policies from.
after building the .rego file it will be automatically mounted to nginx where the opa engine can execute it.
So, to test the policy just execute the following curl
curl --location 'http://localhost:8181/v1/data/httpapi/authz' \
--header 'Content-Type: application/json' \
--data '{
"input": {
"user": "charlie",
"path": ["finance", "salary", "alice"],
"method": "GET"
}
}'after writing your .proto file, you should compile it with mvn to get the java classes needed for development.
mvn clean package1- open postman app
2- go to New
3- select grpc
