Start / How a decision is made
How a decision is made
One question per action: may this subject do this action on this resource? Caroline answers yes or no, names the rule that decided, and records the answer.
The question
Every question has the four parts of an AuthZEN 1.0 evaluation:
| Part | Example | Means |
|---|---|---|
subject | {"type": "agent", "id": "a_supply_agent"} | who asks: a person or an AI agent |
action | {"name": "read"} | what they want to do |
resource | {"type": "inventory", "id": "r_stock_azure_prod"} | what they want to do it to |
context | {"on_behalf_of": "u_plan_mia"} | the circumstances: the person an agent acts for, the gateway it came through |
The ids are enough. Caroline looks the subject and the resource up in its own directory, so a caller cannot make itself a manager by saying so: attributes sent inline for a held record are not trusted.
The answer
{
"decision": true,
"context": { "reason": "..." }
}
Only "decision": true, exactly, allows. Anything else (a false, an error, a timeout, an answer that is not JSON) is a refusal, and the caller does nothing. The reason names the rule and is for your operators, never for the end user or the model.
Rules are data
A rule is a small YAML file: an effect (allow or deny), the subjects it is about, the actions, the resources, and conditions that compare their attributes. One evaluator, written once in Rego, reads every rule, so every rule is checked against the same schema at save and reads back as a sentence. This one is from the AI Agents pack:
# Any AI agent whose role is finance agent may prepare payment orders, provided their department
# matches the resource's department and the resource's gateway is one of their gateways.
id: agent-prepare-payment
effect: allow
subjects:
kind: [agent]
role: [finance_agent]
actions: [prepare]
resources:
type: [payment_order]
conditions:
- {attr: department, op: subject_eq_resource}
- {attr: gateways, op: resource_in_subject_list, resource_attr: gateway}
owner: finance-operations
review_by: '2027-03-31'
The comment on top is Caroline's sentence for the rule, written on every save. The fields decide. The rule model lists every field and operator.
When the model cannot say it, a rule may be written in Rego instead (language: rego). It lives in its own module, says only whether it matches, and is fenced at save: it cannot reach outside its inputs. The evaluator folds it into allow or deny like any other rule.
Deny overrides
- Default deny. With no rule that allows it, the answer is no.
- A deny wins. One matching deny refuses the call, whatever allows it.
- Agents never exceed their person. An agent acting for someone is allowed only when its own rules and that person's would both allow it.
- Shadow rules run beside the live ones and are measured, not enforced, until you switch them on.
Who decides, who enforces
Caroline decides. It never sits in the data path and never sees the data itself, only the question.
Your gateway enforces. It asks before it acts and acts only on an exact yes. Caroline ships a reference MCP gateway; any AuthZEN client can ask the same endpoint.
No model is on the decision path. AI can draft a rule for a person to publish; it never answers a question.
The ledger
Every decision and every change to the rules, keys, agents or directory lands in a retained ledger. Each record carries the hash of the one before it, so a removed or edited record breaks the chain and caroline ledger verify names where.
- Written first. A change is recorded before it is made and closed after.
- One writer. An exclusive lock, so the chain cannot fork.
- Kept. 365 days; any day exports as NDJSON for your SIEM.
Words we use
| Rule | One allow or deny, in one file. A policy is all of an installation's rules together. |
| Pack | A starting set of rules, vocabulary and sample records for one industry or use. |
| Vocabulary | The attributes and actions your rules may name, with their types and allowed values. |
| Directory | Caroline's own store of people, agents and records: what the engine looks an id up in. |
| Engine | OPA, running the one evaluator over your rules. Called the PDP in the standard. |
| Gateway | Whatever asks Caroline and enforces the answer. Called the PEP in the standard. |
| Binding | What one gateway may ask about: which agents, which actions, which kinds of record. |
| Shadow rule | A rule that runs and is measured but does not decide, until you switch it on. |
| Ledger | The retained, hash-chained record of every decision and every change. |
| Author | A person signed in to change rules, keys or records. A viewer can look, not change. |