ON-PREM CHOREO CLOUD BOTH

What it is

The policy engine is a Go service that runs the gateway's policies. Envoy calls it for each request through ext_proc, a hook that lets an outside service inspect and change traffic. It has no built-in policies. Every policy is compiled in when the image is built.

Why it exists

Security and governance rules should be configuration, not code in each agent. A separate engine lets the same router apply different rules to different routes.

How it works

  • Looks up the policy chain for the route, then runs request policies in order, and response policies in reverse order.
  • Decides per chain whether it needs the request body (buffered) or only headers, so body inspection costs nothing when unused.
  • A policy can end the request early, for example with 401, 403 or 429.
  • It fails closed: if the engine cannot answer, Envoy does not let the request through.
  • Admin port 9002. A metrics port (9003) exists but is off unless enabled. In Agent Manager, Envoy reaches it over a Unix domain socket.

Identity and access

It is where authentication and authorization happen. Policies such as api-key-auth, jwt-auth, mcp-auth and mcp-authz run here and read credentials from the request.

Key facts

Ports
Admin 9002, metrics 9003 (off by default)
Language
Go
Failure mode
Fail closed
Side
Data plane (gateway)
Namespace
<org>-<env>

Talks to (1)

Used by (2)

Inside and around

Part of: APG gateway builder