The MeshOPA policy authorizes requests with Open Policy Agent.
The proxy asks an OPA agent running beside it whether to allow each request, and the agent
evaluates Rego policies against the request’s attributes.
MeshTrafficPermission decides whether one workload can
talk to another, based on the identity in the TLS handshake. MeshOPA decides per request,
using the method, path, headers, and optionally the body, so it can enforce rules based on what’s
being asked, not only on who’s asking.
The check runs on the destination’s inbound HTTP traffic, including HTTP/2 and gRPC. It doesn’t
inspect plain TCP traffic or traffic the proxy can’t decrypt. An OPA allow doesn’t override a
MeshTrafficPermission deny: traffic must pass every authorization check.
Proxies that no MeshOPA selects get no OPA check. Before relying on a policy, confirm the
following:
- The data plane has its embedded OPA agent enabled. The
--opa-enabledoption defaults totrue, but can be turned off. - The inbound listener contains
envoy.filters.http.ext_authz.
If the agent is disabled, no check is installed, and onAgentFailure: Deny doesn’t change that.
It only applies when an installed check’s agent fails.