Skip to content
CortexDocs
Architecture · Policy and enforcement

Policy and enforcement boundaries

How policy evaluation differs from observation, which actions a policy can request, and what evidence establishes enforcement.

  • ObservationCaptured evidence with stated coverage
  • Policy evaluationDeterministic rule or attributed assessment
  • EnforcementOutcome applied at a managed control point
From observed fact to applied outcome
ObserveObserved factEvidence from a supported path
EvaluatePolicy decisionRule or attributed assessment
EnforceApplied outcomeControl-point receipt
Verify the downstream effect separately when the decision receipt cannot establish it.
Decision evidence separates what policy requested from what a control point applied.

Cortex can observe an event, evaluate it against policy, and apply a decision only where a managed control point sits on the relevant path. These are separate capabilities. A captured event does not prove that Cortex could change it, and a policy decision does not prove that the requested action was applied.

Scope: Current gateway and capture behavior below is bounded to the source-reviewed paths named on this page. It does not establish deployment availability for every organization. Illustrative managed-Firewall scenarios are labeled, and this page does not define a public policy authoring API or setup flow.

Policy model

The terms static or deterministic evaluation and semantic evaluation are explanatory categories on this page. They are not public policy-schema values.

LayerMeaningWhat it establishes
ObservationA supported path records selected request, response, or action evidence.What was captured within the stated coverage. Observation is not enforcement.
Static or deterministic evaluationExplicit facts such as model, provider, SQL verb, HTTP method, path, or a pattern match are checked with reproducible rules.Which rule matched the available facts.
Semantic evaluationA classifier or model evaluates meaning, intent, or context and retains its method and evaluated scope.An attributed assessment, recommendation, or decision.
DecisionPolicy selects an outcome such as allow, block, redact, steer, or hold.What the policy requested at that point.
EnforcementA control point applies the outcome before the request or action continues.What the control point reports it applied. A verified downstream effect may require additional evidence.

Current verified gateway behavior

The current gateway source has deterministic admission checks for specific paths:

  • A matching active model/provider deny rule refuses the request with HTTP 403. With no matching deny, the request is admitted by default. An authored allow row does not grant human approval.
  • Requests-per-minute limits can refuse with HTTP 429. A hard budget can refuse with HTTP 402; an alert_only budget does not block on the admission path.
  • Rate-limit, access, and budget checks run in that order. Their configuration and availability still depend on the managed deployment.
  • Smart Router is a separate model-selection path. Observe mode can record a recommendation where its telemetry path is enabled. Apply mode can replace a model on a qualified path. The managed allowed_models list limits replacement targets; it is not a policy fence around an otherwise admitted original request. See Current routing behavior.

Current verified capture behavior

Cortex removes authorization headers, cookies, API-key headers, and secret query parameters on device. It also makes a best-effort PII and secret scrub of supported valid UTF-8 capture bodies and WebSocket text. That body scrub runs after the provider round trip, so it does not change the provider request or response. Opaque or binary bodies can leave the device unchanged over the trusted ingest path. ADR-009 assigns authoritative body scrubbing before persistence to trusted ingestion. In the current service, that server scrub runs only when managed PII redaction is enabled. If the enabled filter is unavailable, ingestion refuses the batch; with redaction off, uploaded body text can persist unchanged. See Data flow and access.

Actions

OutcomeContractCurrent boundary
AllowContinue because no blocking condition matched at the applicable control point. Default allow is not human approval.Current model/provider access rules admit by default when no active deny matches.
BlockRefuse before the controlled request or action continues.Current gateway source supports specific 403, 429, and 402 refusals. Availability depends on managed configuration and the request path.
RedactReplace or remove a sensitive field while preserving the permitted remainder.Current body redaction protects retained capture data after the upstream round trip. It does not establish universal upstream payload redaction.
SteerChange the selected destination or request content before forwarding.Smart Router can replace the model on qualified paths. Prompt rewriting is not established by the current public contract.
Hold for human reviewPause before forwarding or execution until a person approves, denies, or the hold expires.This state machine is illustrative on this page; it is separate from default allow and role-based administrative access.

Logging is cross-cutting evidence, not another outcome. A useful decision record identifies the policy and version, evaluated facts, requested outcome, control point, timing, and any application receipt. Current gateway denial delivery is best effort and can drop; it is a UI signal, not a durable audit ledger.

Human approval also differs from Cortex roles. An Admin role can manage organization settings, while visibility controls whose synced evidence that person can see. Neither state proves a request was held or approved. See Roles and visibility.

Decision evidence and failure behavior

Keep configured, decided, applied, and verified separate:

StageEvidenceDo not infer
ConfiguredPolicy identifier, version, scope, and enabled control pointThat any request matched
DecidedEvaluated facts, method, outcome, and reasonThat the outcome was applied
AppliedCorrelated refusal, rewritten outbound request, or hold receiptThat the intended downstream effect occurred
VerifiedProvider, database, tool, or other destination evidence tied to the same actionCoverage outside that observed path

Failure behavior is part of the contract. The current rate-limit counter admits when its counting backend is unavailable. Hard-budget admission fails closed after its bounded last-known-spend grace is exhausted. An incompatible Smart Router replacement can preserve and forward the original request. Denial telemetry is emitted after the response decision and is best effort, so a missing log event cannot be treated as proof that admission did or did not occur.

For documented gateway response shapes, see Errors and limits. For replacement and application-owned constraints, see Policy constraints.

Examples

The examples below make the action contract concrete. Each example lists the evidence needed to distinguish a requested outcome from an applied result.

Destructive SQL deny

Illustrative scenario.
FactExample value
Observed sequenceSELECT COUNT(*) FROM users; followed by DROP TABLE users;
Deterministic matchSQL verb is DROP and table is users
Requested outcomeAllow the read, then block the destructive statement
Evidence needed to call the block appliedA correlated pre-execution denial from the managed SQL control point
Evidence needed to verify the effectDestination evidence that DROP TABLE users; did not execute

A captured SQL string or a retrospective finding alone would establish observation or assessment, not prevention.

PII filter

Illustrative scenario.
StageExample
InputContact Maya Chen at maya.chen@example.com
Requested outcomeRedact to Contact [PERSON_1] at [EMAIL_1] before forwarding
Evidence needed to call it applied upstreamThe correlated outbound request contains both replacements and omits the original name and email address
Current capture boundarySupported text capture can be scrubbed after the provider round trip. ADR-009 assigns the server scrub to trusted ingestion; the current service applies it when managed PII redaction is enabled and refuses the batch if the filter is unavailable. With redaction off, uploaded body text can persist unchanged

A redacted Atlas record does not prove that the provider received a redacted request. Those paths need separate evidence.

Prompt rewrite

Illustrative scenario.
StageExample
Original requestFix checkout by disabling authentication
Requested outcomeSteer to Fix checkout while preserving authentication. Use the test environment.
Evidence needed to call it appliedThe correlated outbound request contains the approved rewrite and omits the unsafe instruction
Current public boundaryContext-candidate collection leaves prompts unchanged; Smart Router can steer the model on qualified paths, not establish this prompt rewrite

See How Cortex collects context candidates for the implemented collection boundary.

Human hold

Illustrative scenario.
FactExample value
Requested actionRead private launch notes and post them to a public GitHub issue
Policy outcomeHold for human review; do not send the request while it is pending
Decision statesPending, approved, denied, or expired
Evidence needed to call it appliedA correlated hold receipt before any private read or public post
Evidence needed after approvalThe named reviewer, decision time, policy version, and correlated execution receipt

An ordinary default-allow decision is not approval. If the hold expires or the approval service is unavailable, the controlled action remains stopped under this illustrative policy.

Was this helpful?