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
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.
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)
All 69 cases, from payroll, schools, defence, research consortia and AI agents, run as tests.
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)
Payroll is closed. Only the executive salary report, approved by the CFO, opens it.
The CEO may read salaries, at most as totals, for the executive salary report, until 30 June 2027.
✓ Ana (CEO) reads salaries → totals
✕ Eva (analyst) reads salaries → refused
/-- Once a rule set passes the strict check, what it releases is the same under every model reading. -/ theorem release_reading_free_of_check (R : List Rule) (hR : strictOK R = true) (ρ ρ' : Reading → Bool) : release φ ρ R q f = release φ ρ' R q f := by simp only [release, blocked_rf, capsOK_rf, permitted_rf]
Lean 4, no Mathlib. One of 141 theorems in the proof files (simplified signature).
$ python3 -m pytest -q test_cases.py ........................................................................ [ 52%] .................................................................. [100%] 145 passed in 46.01s
Real output of the case suite, 25 November 2026.
Every access question.
One language.
Data access
The CEO's salary reportTotals over at least ten people, for one use case, until it ends.C002 → A teacher outside the classGrades stay with the teachers who teach the class.C011 →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.