
Policies
CertifiedEnterprise EditionTasks for managing OPA policies: upload, list, delete, evaluate, and compile decisions.
Policies
Tasks for managing OPA policies: upload, list, delete, evaluate, and compile decisions.
tasks
How to use the OPA plugin
Evaluate policies, compile queries, and manage policies on Open Policy Agent from Kestra flows.
Authentication
All tasks require url (the OPA API base URL, required). Optionally set token (a Bearer token) for authenticated OPA instances. Store secrets in secrets and apply connection properties globally with plugin defaults.
Tasks
policy.Evaluate evaluates a policy rule — set url and policyPath (both required). Optionally set input (input document as a map), metrics (include OPA metrics in response), and explain (explanation level). Outputs response (raw OPA response), result (value of the result field), defined (whether the result is defined), and decisionId.
policy.Compile partially evaluates a query — set url and query (both required). Optionally set input, unknowns, options, metrics, and explain. Outputs response, result, queries, and defined.
policy.List lists all uploaded policies — set url (required). Optionally set fetchType (FETCH, FETCH_ONE, or STORE, default FETCH). Outputs policies or policy or uri, plus size and total.
policy.Upload uploads a policy — set url, policyId, and policy (the Rego policy string, all required).
policy.Delete deletes a policy — set url and policyId (both required).