> Paper 1 draft: "A Model May Read, Never Decide" (in preparation) · About the paper141 Lean theorems · 152 tests

KanonLANG

Access rules you can prove, not just write.

Kanon is a small language for access rights. It decides who may receive which data, in which form, for which use case, and through which agent. Each decision names the rule that made it, and the guarantees are proved in Lean.

141 theorems in Lean  ·  69/69 cases decided  ·  36/40 held-out cases

The payroll rules as a graph Entities (Ana, Ben, the CEO, deputy CEO and CFO positions, the executives group, payroll, payroll.salary, the read action and the executive salary report use case) are round nodes. Three rules are square hubs joined to the entities they attach to: ceo_report permits the CEO to read payroll.salary up to aggregated when the use case is declared; pay_boundary closes payroll unless the use case lifts it; deputy_asks sends the deputy CEO's requests to the CEO. Dotted lines show the above order: Ana holds the CEO position, salary is part of payroll. The highlighted path shows Ana's request decided by ceo_report: allow, aggregated. holds holds part of member of owns Ana Ben position:ceo position:deputy_ceo position:cfo group:executives usecase exec_salary_report payroll payroll.salary action read ceo_reportpermit ≤ aggregated pay_boundaryboundary deputy_asksask above allow · aggregated entityruleabove

One place
decides who sees what.

People, agents and models send requests. Kanon finds the rules that touch the request, combines them, and releases the weakest form of the data that serves the use case. A model's reading can make Kanon ask a question. It can never open access.

How Kanon decides Four requesters at the top (person, agent, model, app) send requests into Kanon in the middle, which finds, combines and decides rules and audits the disclosure history. Data products at the bottom (grades, contracts, payroll, travel, research) are released only in the form Kanon allows. Example: payroll.salary released as aggregated by rule ceo_report. PERSONAGENTMODELAPP Kanon find · combine · decide · audit gradescontractspayrolltravelresearch payroll.salary · released as aggregated · rule ceo_report

Ask it something.

Requests against the payroll rules. Pick one to see the verdict, the form the data leaves in, and the rule that decided.

The rules behind the demo

One rule, three readers.

Engineers read the rule. Data owners read the sentence and approve examples, never text. Reviewers read the proof.

The reference interpreter (released with the paper)

$ python3 -m pytest -q test_cases.py 145 passed

All 69 cases, from payroll, schools, defence, research consortia and AI agents, run as tests.

payroll.kanon
usecase exec_salary_report
  owner      position:cfo
  positions  position:ceo
  needs      payroll.salary max aggregated min_group 10
  valid      until 2027-06-30

rule pay_boundary
  boundary lifted by exec_salary_report
  on asset payroll

rule ceo_report
  permit up to aggregated
  on position position:ceo, asset payroll.salary
  when declared usecase(exec_salary_report)

Guarantees

What Kanon promises, and how it is checked.

Models never open access

A model's reading can only make Kanon ask the requester to confirm. A rule that lets a reading release data is a syntax error. Proved in Lean for every rule set that passes the check.

The answer is a form

Not only yes or no: raw rows, pseudonymised, anonymised, totals over a minimum group, counts or metadata. The forms are a lattice, and the weakest form that serves the use case is what leaves.

History counts

An auditor per requester refuses small groups and pairs of releases that would expose one person. It reads populations, never values, so a refusal leaks nothing.

Small on purpose

Non-recursive, stratified Datalog over a finite world. Rule order changes nothing, forbid wins, and every decision is polynomial with exactly one answer.

One rule set, four engines

The reference interpreter decides; Cedar's analyzer proves a rule set meets its boundary and shows what a change adds; ProbLog chooses which question to ask; a small checker runs inside each tool server.

Tested beyond its own cases

Forty held-out cases, written after the language was frozen: 36 get the right verdict and form. The 69 cases were also run in Cedar, OPA/Rego and XACML; the results, including where Kanon is weakest, are published.

A model may read,
never decide.

The paper sets out the language, its semantics and 141 machine-checked theorems, and tests it on 69 design cases and 40 held-out cases, against Cedar, OPA/Rego and XACML run on the same cases.

Read the rules. Check the proofs.