What a decider answers for one subject, operation, and object. It holds
the verdict, the reason in one word, the version of the rules that gave
it, and meta.
meta belongs to the decider. What only one decider can say travels
there, so the reason stays a word every decider shares. A decider that
sets one of these keys gives it this value:
| Key | Value |
|---|---|
:rule | The rule, clause, policy, or relation the verdict came from |
:matched | The rules, clauses, or path an explanation lists |
:detail | The engine's own text, where the reason is :engine_unreachable |
:kind | The subject kind the port does not know |
Summary
Types
Why the verdict is what it is, in a form a record carries without an attribute value.
One answer: the verdict, why, the policy version that decided, and whatever the adapter puts in meta.
What the rule said about the request.
Types
@type reason() ::
:allowed
| :deny_by_default
| :rule_denied
| :engine_unreachable
| :missing_fact
| :unknown_operation
| :unknown_subject_kind
Why the verdict is what it is, in a form a record carries without an attribute value.
@type t() :: %Mediate.Answer{ meta: map(), reason: reason(), verdict: verdict(), version: String.t() | nil }
One answer: the verdict, why, the policy version that decided, and whatever the adapter puts in meta.
@type verdict() :: :allow | :deny
What the rule said about the request.
Functions
@spec reasons() :: [reason()]
The reasons, in the order the type lists them.