Skip to main content

How OPA Works in Hexr

Every outbound request from an agent container passes through Envoy, which calls OPA (Open Policy Agent) before forwarding:
OPA receives the agent’s SPIFFE ID and the requested service, and evaluates your Rego policies.

Policy Input

OPA receives this input for every request:

Example Policies

Service Access by Role

Time-Based Access

Rate Limiting


Deploying Policies

Policies are deployed as Kubernetes ConfigMaps:

Testing Policies

Use OPA’s built-in test framework: