Skip to content
dyoktoPublic

About

Policy enforcement point for Envoy, Traefik, nginx and Caddy that asks any OpenID AuthZEN 1.0 PDP, with a decision cache.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

portero

portero is a policy enforcement point that lets a proxy ask any OpenID AuthZEN 1.0 policy decision point (PDP) whether a request may pass, and caches the answers. It is one binary with two front doors: the Envoy ext_authz v3 gRPC API, and one forward-auth HTTP endpoint for Traefik ForwardAuth, nginx auth_request and Caddy forward_auth. It verifies the caller's bearer JWT against a JWK Set, maps the HTTP request to an AuthZEN access evaluation request (by default as the AuthZEN REST API Gateway Profile proposal describes), asks the PDP or its decision cache, and fails closed on anything it cannot parse, verify or reach.

Status: pre-alpha. The configuration format and the mapping may change. Do not protect production traffic with it yet.

How it fits

Forward-auth proxies decide on the HTTP status alone: 2xx lets the request through. An AuthZEN PDP answers a deny with 200 OK and {"decision": false} (AuthZEN 1.0 §6.2), so pointing Traefik, nginx or Caddy straight at a PDP allows everything. portero turns the decision into a status (200, 401, 403, or 503 when the PDP fails), and gives Envoy, Traefik, nginx and Caddy one mapping, one token check and one decision cache in front of whichever AuthZEN PDP you run.

client -> Envoy / Traefik / nginx / Caddy -> backend
                    |
                    | ext_authz gRPC or forward-auth HTTP
                    v
                 portero -- JWT check, mapping, cache
                    |
                    | POST /access/v1/evaluation
                    v
               any AuthZEN 1.0 PDP

Not in v0: HAProxy SPOE, Envoy ext_authz HTTP service mode, AuthZEN evaluations (batch), and trusting identity headers set by an upstream. docs/scope.md lists everything portero does and does not do.

Install

There is no release yet. Build from source with the toolchain in rust-toolchain.toml:

cargo build --release
./target/release/portero --check examples/traefik/portero.toml
./target/release/portero path/to/portero.toml

Or build the container image from the Dockerfile.

Try it

The Traefik example runs Traefik, portero, the OPA AuthZEN plugin and a backend, and sends allowed and denied requests through it. It needs Docker and OpenSSL 3 (for the demo signing key):

./examples/traefik/setup.sh
docker compose -f examples/traefik/compose.yaml up -d --build --wait
./examples/traefik/check.sh

Documentation

Contributing

See CONTRIBUTING.md. Every commit is signed off (git commit -s).

Security

Report vulnerabilities privately, as described in SECURITY.md.

License

Apache-2.0.

About

Policy enforcement point for Envoy, Traefik, nginx and Caddy that asks any OpenID AuthZEN 1.0 PDP, with a decision cache.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages