Start opa-authzen-plugin with the example policy from this repository, then send it AuthZEN evaluation requests with curl: one that the policy denies, the same request changed so that it is allowed, and one that is rejected before the policy runs. You need curl and jq, and Go, Docker or nothing else depending on how you install it.
Install
Section titled “Install”Linux and macOS binary
Releases ship bare binaries, not archives: opa_authzen_linux_amd64, opa_authzen_linux_arm64, opa_authzen_darwin_amd64, opa_authzen_darwin_arm64 and opa_authzen_windows_amd64.exe, from the releases page.
gh release download -R dyokto/opa-authzen-plugin -p opa_authzen_linux_amd64sudo install opa_authzen_linux_amd64 /usr/local/bin/opa-authzen-pluginContainer image
Multi-arch (linux/amd64, linux/arm64) at ghcr.io/dyokto/opa-authzen-plugin, tagged with the release version without the v.
docker pull ghcr.io/dyokto/opa-authzen-plugin:0.13.0The image's entrypoint is the plugin binary. In Start the server, run the container below instead of the opa-authzen-plugin run line, and stop it with docker rm -f authzen at the end. --addr 0.0.0.0:8181 is needed because OPA binds localhost by default, which a published port cannot reach.
docker run -d --name authzen -p 8181:8181 -v "$PWD/example:/example:ro" \ ghcr.io/dyokto/opa-authzen-plugin:0.13.0 \ run --server --addr 0.0.0.0:8181 --config-file /example/config.yaml /example/policy.regoGo
Needs Go 1.26.1 or later (the go line in go.mod). Installs to $(go env GOPATH)/bin.
go install github.com/dyokto/opa-authzen-plugin/cmd/opa-authzen-plugin@latestThe binary is OPA with the AuthZEN plugin compiled in, so it has every opa subcommand. version prints the version of OPA it is built on (OPA 1.23.0 for v0.13.0), not the plugin release:
$ opa-authzen-plugin versionVersion: 1.23.0...Get the example files
Section titled “Get the example files”The policy and config are example/policy.rego and example/config.yaml.
git clone --depth 1 https://github.com/dyokto/opa-authzen-plugincd opa-authzen-pluginThe config enables the plugin and names the package and rule that decide:
plugins: authzen: path: "authzen" decision: "allow"Start the server
Section titled “Start the server”This starts OPA on localhost:8181 with the AuthZEN endpoints on the same server, in the background, and waits until it answers. --log-level error keeps its request log out of your terminal.
$ opa-authzen-plugin run --server --log-level error \ --config-file example/config.yaml example/policy.rego &$ until curl -sf -o /dev/null http://localhost:8181/health; do sleep 0.2; doneA request the policy denies
Section titled “A request the policy denies”Bob asks to delete a document. Nothing in the policy allows it, so default allow = false decides:
$ curl -s http://localhost:8181/access/v1/evaluation \ -H 'Content-Type: application/json' \ -d '{"subject": {"type": "user", "id": "bob"}, "action": {"name": "delete"}, "resource": {"type": "document", "id": "doc-123"}}'{"decision":false}A denial is a 200 response with "decision": false, not an HTTP error status.
The same request, allowed
Section titled “The same request, allowed”The first rule in the policy allows any action for a subject with the admin role:
default allow = false
# Allow if the subject has the "admin" role.allow if input.subject.properties.role == "admin"Send the same request with that property on the subject:
$ curl -s http://localhost:8181/access/v1/evaluation \ -H 'Content-Type: application/json' \ -d '{"subject": {"type": "user", "id": "bob", "properties": {"role": "admin"}}, "action": {"name": "delete"}, "resource": {"type": "document", "id": "doc-123"}}'{"decision":true}A request that never reaches the policy
Section titled “A request that never reaches the policy”A request without subject, action or resource is rejected with 400 before the policy is evaluated:
$ curl -s -w '%{http_code}\n' http://localhost:8181/access/v1/evaluation \ -H 'Content-Type: application/json' \ -d '{"subject": {"type": "user", "id": "bob"}}'{"error":"subject, action, and resource are required"}400Several decisions in one request
Section titled “Several decisions in one request”/access/v1/evaluations takes defaults at the top level and one item per decision (Section 7). Reading is allowed for any subject with an id; deleting is not:
$ curl -s http://localhost:8181/access/v1/evaluations \ -H 'Content-Type: application/json' \ -d '{"subject": {"type": "user", "id": "bob"}, "resource": {"type": "document", "id": "doc-123"}, "evaluations": [{"action": {"name": "read"}}, {"action": {"name": "delete"}}]}'{"evaluations":[{"decision":true},{"decision":false}]}What the server advertises
Section titled “What the server advertises”The PDP metadata (Section 9) lists the endpoints this server serves. The example config sets the three search rules, so the search endpoints are listed too:
$ curl -s http://localhost:8181/.well-known/authzen-configuration | jq .{ "policy_decision_point": "http://localhost:8181", "access_evaluation_endpoint": "http://localhost:8181/access/v1/evaluation", "access_evaluations_endpoint": "http://localhost:8181/access/v1/evaluations", "search_subject_endpoint": "http://localhost:8181/access/v1/search/subject", "search_resource_endpoint": "http://localhost:8181/access/v1/search/resource", "search_action_endpoint": "http://localhost:8181/access/v1/search/action"}Stop the server when you are done:
kill %1Verify a release
Section titled “Verify a release”checksums.txt is signed keylessly with cosign by the release workflow, and each image is signed by digest by the image workflow. Releases up to v0.12.1 were signed under kanywst/opa-authzen-plugin; RELEASE.md has the commands for those.
$ gh release download -R dyokto/opa-authzen-plugin \ -p checksums.txt -p checksums.txt.sigstore.json -p opa_authzen_linux_amd64$ cosign verify-blob checksums.txt \ --bundle checksums.txt.sigstore.json \ --certificate-identity-regexp '^https://github\.com/dyokto/opa-authzen-plugin/\.github/workflows/post-tag\.yaml@refs/tags/v' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comVerified OK$ sha256sum --check --ignore-missing checksums.txtopa_authzen_linux_amd64: OK$ cosign verify ghcr.io/dyokto/opa-authzen-plugin:0.13.0 \ --certificate-identity-regexp '^https://github\.com/dyokto/opa-authzen-plugin/\.github/workflows/publish\.yaml@refs/tags/v' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com > /dev/null
Verification for ghcr.io/dyokto/opa-authzen-plugin:0.13.0 --The following checks were performed on each of these signatures: - The cosign claims were validated - Existence of the claims in the transparency log was verified offline - The code-signing certificate was verified using trusted certificate authority certificatesThe image also carries a BuildKit SPDX SBOM and SLSA provenance, and the release carries opa_authzen_sbom.spdx.json for the source module.
- Configuration: every
plugins.authzenkey, obligations, the Access Request and Approval profile, and decision logs - API reference: request and response shapes for each endpoint, including search
- API gateway integration: Envoy in front of the PDP
- Examples: ABAC, the AuthZEN interop Todo scenario, and Kubernetes
© 2026 The opa-authzen-plugin Authors. Licensed under Apache-2.0. Part of dyokto.