opa-authzen-plugin
Section titled “opa-authzen-plugin”An extended version of OPA (OPA-AuthZEN) that implements the OpenID AuthZEN Authorization API 1.0 as a native OPA plugin.
Looking for
opa-authzen? This is it. The repository and Go module are both namedopa-authzen-plugin— import pathgithub.com/dyokto/opa-authzen-plugin(v0.12.1 and earlier:github.com/kanywst/opa-authzen-plugin). The-pluginsuffix is load-bearing: this is not a gateway or a sidecar in front of OPA, it is a plugin that makes OPA itself serve the AuthZEN endpoints.
Architecture
Section titled “Architecture”┌──────────────────────────────────────────────────┐│ OPA Process (:8181) ││ ││ ┌────────────────────────────────────────────┐ ││ │ OPA HTTP Server │ ││ │ │ ││ │ Built-in Routes AuthZEN Routes │ ││ │ ┌──────────────┐ ┌───────────────────┐ │ ││ │ │ POST /v1/ │ │ POST /access/v1/ │ │ ││ │ │ data/... │ │ evaluation │ │ ││ │ │ GET /health │ │ POST /access/v1/ │ │ ││ │ │ ... │ │ evaluations │ │ ││ │ └──────────────┘ │ GET /.well-known/ │ │ ││ │ │ authzen-config. │ │ ││ │ └─────────┬─────────┘ │ ││ └──────────────────────────────┼─────────────┘ ││ │ ││ ┌──────────────────────────────▼─────────────┐ ││ │ AuthZEN Plugin (ExtraRoute) │ ││ │ ┌─────────┐ ┌──────────┐ ┌──────────┐ │ ││ │ │ Validate│ │ Evaluate │ │ Metadata │ │ ││ │ │ Request │─▶│ Policy │ │ Endpoint │ │ ││ │ └─────────┘ └─────┬────┘ └──────────┘ │ ││ └─────────────────────┼──────────────────────┘ ││ │ ││ ┌─────────────────────▼──────────────────────┐ ││ │ OPA Rego Engine + Store │ ││ │ ┌──────────┐ ┌───────────┐ ┌─────────┐ │ ││ │ │ Compiler │ │ In-Memory │ │ Bundles │ │ ││ │ │ │ │ Store │ │ │ │ ││ │ └──────────┘ └───────────┘ └─────────┘ │ ││ └────────────────────────────────────────────┘ │└──────────────────────────────────────────────────┘The plugin registers AuthZEN endpoints directly on OPA's own HTTP server (:8181) using OPA's ExtraRoute extension point. This means AuthZEN routes get OPA's built-in Prometheus metrics, OpenTelemetry tracing, and server authorization automatically — no separate port or listener required. The plugin writes its decisions to OPA's decision log itself (see Decision logs), since OPA's server only logs the routes it serves.
AuthZEN 1.0 Compliance
Section titled “AuthZEN 1.0 Compliance”| Spec Section | Feature | Status |
|---|---|---|
| Section 5 | Information Model (Subject, Action, Resource, Context, Decision) | ✅ Supported |
| Section 6 | Access Evaluation API (POST /access/v1/evaluation) |
✅ Supported |
| Section 7 | Access Evaluations API (POST /access/v1/evaluations) |
✅ Supported |
| Section 7.1.1 | Default value merging for batch evaluations | ✅ Supported |
| Section 7.1.2.1 | Evaluation semantics (execute_all, deny_on_first_deny, permit_on_first_permit) |
✅ Supported |
| Section 8 | Search APIs (Subject, Resource, Action) | ✅ Supported (opt-in via search config) |
| Section 8.2 | Search pagination (stateless opaque token) | ✅ Supported |
| Section 9 | PDP Metadata (GET /.well-known/authzen-configuration) |
✅ Supported |
| Section 9.1.3 | Signed metadata (signed_metadata) |
✅ Supported (opt-in; the JWT is signed outside the plugin) |
| Section 10.1 | HTTPS Transport Binding (JSON serialization, Content-Type validation) | ✅ Supported |
| Section 10.1.3 | X-Request-ID echo | ✅ Supported |
| Section 11.7 | Request payload protection (body size limit, batch size limit) | ✅ Supported |
| Obligations Core (Draft 1) | Discovery, opt-in and per-type negotiation, PDP outcome rule | ✅ Supported (opt-in via supported_obligations) |
| Access Request and Approval Profile (Draft 1) | PDP discovery: access_request_endpoint, jwks_uri, capability URN |
✅ Supported (opt-in) — see Configuration |
| Access Request and Approval Profile (Draft 1) | Access Request / Task Status endpoints, approval workflow, token signing | ❌ Not implemented — the profile permits a separate service to host these |
The Authorization API itself is final at 1.0. The two profiles are not: both are titled Draft 1 upstream, and the 1_0 in their filenames and URLs is the document name, not a released version. Support for them is opt-in and their normative text can still move — the denial-binding rules in the Access Request and Approval profile changed in September 2026, after this plugin shipped support for its discovery members.
Issue Management
Section titled “Issue Management”Use GitHub Issues to request features or file bugs.
Quick Start
Section titled “Quick Start”The quick start installs the plugin, starts it with the policy in example/, and sends one denied and one allowed evaluation request. Docs site: https://dyokto.github.io/opa-authzen-plugin/.
make build./opa-authzen-plugin run --server --config-file example/config.yaml example/policy.regoThis starts OPA on :8181 with the AuthZEN endpoints registered on the same server.
curl -s -X POST http://localhost:8181/access/v1/evaluation \ -H "Content-Type: application/json" \ -d '{ "subject": {"type": "user", "id": "alice", "properties": {"role": "admin"}}, "resource": {"type": "document", "id": "doc-123"}, "action": {"name": "delete"} }'The response should be:
{"decision":true}Documentation
Section titled “Documentation”- docs/quickstart.md: install, start the server, then one denied, one allowed and one rejected request
- docs/configuration.md: every
plugins.authzenkey, Obligations Core, the Access Request and Approval Profile and Decision logs - docs/api.md: request and response shapes for every endpoint
- docs/gateways.md: running the PDP behind Envoy or another API gateway
- docs/docker.md: the container image,
docker run, and Kubernetes - example/: example policies and configs, including ABAC, the AuthZEN interop Todo scenario and Envoy
- RELEASE.md: verifying release signatures
- CHANGELOG.md
API Gateway Integration
Section titled “API Gateway Integration”Moved to docs/gateways.md.
Docker
Section titled “Docker”The published image is ghcr.io/dyokto/opa-authzen-plugin. docs/docker.md has the docker run command and the Kubernetes example.
Configuration
Section titled “Configuration”The plugin is configured under the plugins.authzen key in the OPA config file. Every key is described in docs/configuration.md.
Obligations Core
Section titled “Obligations Core”Moved to docs/configuration.md.
Access Request and Approval Profile
Section titled “Access Request and Approval Profile”Moved to docs/configuration.md.
Decision logs
Section titled “Decision logs”Moved to docs/configuration.md.
API Reference
Section titled “API Reference”Moved to docs/api.md.
License
Section titled “License”Apache License 2.0. See LICENSE.
© 2026 The opa-authzen-plugin Authors. Licensed under Apache-2.0. Part of dyokto.