description |
---|
Install and run the Open Policy Engine (OPA) on your local machine |
- Download the Open Policy Agent as described here.
- Set the permissions of the downloaded file to allow execution:
chmod 755 ./opa
- Move the downloaded executable to a location in your system's PATH to make it accessible from any directory. A common location for custom binaries on macOS is ~/.local/bin. You can move it there with the following command:
mv opa ~/.local/bin/opa
- Test the setup by running a simple expression with OPA:
opa eval "1*2+3"
- If everything is working correctly, you should see output like this:
{
"result": [
{
"expressions": [
{
"value": 5,
"text": "1*2+3",
"location": {
"row": 1,
"col": 1
}
}
]
}
]
}
- Creating a dynamic policy
- Verifying a verifiable credential using a dynamic policy