﻿# OPA Data API success can omit the decision result

A practical investigation of oPA Data API success can omit the decision result, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-security-opa-data-api-undefined-result-admission/
Language: en

## The operational scenario

An inference admission client calls an OPA policy document and receives a successful HTTP response containing no decision result. Its wrapper treats no error as allowed access. A policy typo or an undefined rule can then look indistinguishable from a positive authorization. The review needs the decision document contract, not only the transport status or the policy service health check.

## The trust-boundary mechanism

OPA documents that the versioned Data API can return HTTP 200 for an undefined document while omitting the result property. A defined boolean false is a different value from an omitted result, and another endpoint can use different missing-document behavior. Rego default can supply a defined decision when a rule otherwise has none. Neither a default nor transport success proves the client queried the intended loaded document.

## Define the control contract

Define the exact endpoint, policy path and expected result schema. If admission expects a boolean, require the explicit permitted boolean value rather than truthiness of a response object. Classify undefined, wrong type, invalid response and evaluation errors separately from an explicit policy denial. The fallback response is an application policy; do not retrospectively report every fallback as a decision OPA positively made.

## A step-by-step verification

First create local synthetic policies producing a known allow, a known false and an undefined result. Exercise the real response parser against each, plus a wrong document path and a deliberately wrong result type. Next inspect any default rule and repeat the undefined-input case. Preserve the returned shape without private inputs. Finally verify the admission outcome and recorded reason, ensuring transport success cannot independently open the gate.

## Evidence required for acceptance

Acceptance requires the requested document identity, response classification and actual client admission action for every fixture. Preserve an absent result distinctly even when the selected safe behavior is rejection. A deny-by-default rule can improve defined outcomes for its document, but a path typo can still address another undefined document. Keep that negative control after adding the default so the parser contract remains independently observable.

## Failure cases and limits

This article covers the versioned Data API response contract, not every OPA query, compile or unversioned endpoint. It does not prove that a well-shaped allow decision reflects correct business policy or complete input provenance. Those require separate review. The useful result is an admission client that cannot confuse successful evaluation transport with an explicit permission, while retaining diagnostic evidence about missing or malformed decisions.

## Primary references and related reading

Require the expected decision shape and an explicit allow value; HTTP success alone is not authorization. [OPA Data API undefined-result contract](https://www.openpolicyagent.org/docs/rest-api); [Rego explicit default decision values](https://www.openpolicyagent.org/docs/policy-reference/keywords/default).

The proposed investigation of opa data api undefined result admission is a proposed control review; no live security test was executed. Related reading: [agent-triage: policy coverage, evaluator errors and diagnostic claims](/journal/agent-triage-policy-denominator-evaluator-error-boundary/); [Golden inference API fixtures: test the contract rather than prose](/journal/provider-golden-contract-fixtures/).
