Skip to main content
Use execute endpoints as synchronous write guards.
  • POST /execute
  • POST /v1/execute
Decision values are only:
  • approved
  • denied
Recommended integration pattern:
  1. Validate/normalize input.
  2. Evaluate decision.
  3. Mutate only on approved.
  4. Persist ctx_id, trace_hash, and reason metadata.

Library Quick Start (Python)

Request Example (Denied)

In v1, an allow policy is approved only if all its rules pass. Any rule failure produces denied with structured reasons.

Response Shape (Denied)

Response Shape (Approved)

Policy Context Model

policy_context is optional, but recommended for production. Kernite evaluates policies supplied in policy_context.selected_policies. In OSS mode, Kernite does not fetch policy state from storage. Main fields:
  • governed (bool): request is enforced as governed scope
  • selected_policies (array): policies selected by your resolver
  • governed_scopes (array): optional scope list (object_type + operation)
  • policy_selection_reason_code (string): explicit selection reason
Default behavior:
  • governed + no selected policy => denied with no_matching_policy
  • not governed + no selected policy => approved with out_of_scope_phase1
For full contract invariants, see /concepts/compatibility.