Skip to content

Praxis mode: an outbound policy plugin fails open with only a Warn #1768

Open

Description

@huang195

Problem

In praxis mode, Cortex builds no outbound plugins (outboundEntries, cmd/cortex/praxis.go, from #1765). cortex-gateway runs only its recording filters. A WebSocket upgrade does not go through the gateway. So no outbound plugin runs on any request.

The config keeps its plugin list, and Cortex accepts it. The only signal is one Warn line at start-up and at each reload. The UI and agentop show nothing.

Effect, by plugin type:

Type Plugins In praxis mode
Policy and limits opa, cpex, ibac, jwtvalidation, sessionbudget, litellm_budgettrack, sparc, script Fails open. A request that the plugin rejects in direct mode gets to the origin.
Credentials tokenexchange, tokenexchangeaiac, tokenbroker, staticinject Fails closed. The origin gets no credential and answers 401 or 403. No secret leaks.
Routing inferencerouter The request goes to the host the client named.
Optimization, parsing toolprune, contextguru, parsers, lineage Cost or features change. Not a safety problem.

The default laptop config (cmd/cortex/local.go) has only inference-parser and tool-prune, so a default install loses no policy. A user who added a policy plugin and turns on praxis loses it.

Decision for now

Keep the Warn (decided on #1765). #1714 tracks the port or retirement of each plugin ("Still open").

Proposed next step

Fail closed until the gateway runs the policy plugins: validatePraxis (core/config/validate.go) refuses praxis.enabled when a plugin of type policy, credentials or routing is in the outbound list. The default config still passes.

Related: #1714, #1721, #1765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions