Cryptographic layer
KERI and ACDC establish identity control and portable authority.
- KERI
- ACDC
- KEL
selfdriven · ID · AuthZ & Lean
AuthZ determines whether an action is permitted. Lean can formally prove that the authorisation logic satisfies its intended security properties.
Try the authorisation model Part of KERI & AuthZ: read the overviewconditions in the example claim policy
theorems, holding for all possible inputs
security properties Lean could prove
layers of trust: cryptographic, contextual, logical, operational
AuthZ as a mathematical proposition
Every authorisation request can be expressed as a proposition over a subject s, an action a, a resource r and a context c. These correspond directly to the AuthZEN information model.
In Lean, propositions are types, and proofs establish that those propositions hold. This creates a natural relationship between authorisation and formal verification.
Permitted(s, a, r, c)
See it in Lean 4At a glance
Four layers of trust, one six-input decision function, nine formal guarantees — and how verifiable AuthZ with Lean differs from traditional AuthN/AuthZ.
The four layers of trust
KERI and ACDC establish identity control and portable authority.
The Verified Context Graph maps context, while Lean proves the authorisation logic.
AuthZEN standardises decisions, and entityOS Sentinel enforces them at runtime.
Deterministic AuthZ & formal proofs
AuthZ = f(I,A,R,C,P,T)
Evaluates identity, authority, resource, context, policy and time.
Proves properties such as default deny and revocation across all inputs.
PCA
Machine-checkable proofs demonstrate why an action was permitted.
Traditional vs verifiable AuthZ + Lean
Traditional AuthN/AuthZ
Verifiable AuthZ + Lean
Proposed architecture
Together, AuthZ and Lean enable a transition from authorisation based on trusted software to authorisation based on mathematically verified logic. Each component has one responsibility.
Signed request to perform an action.
Prove identity and key control.
Provide verifiable evidence of authority.
Standardise authorisation requests and responses.
Facts, relationships, rules and constraints. Represents contextual relationships and constraints.
Formally verify the authorisation logic.
The policy decision point returns one of two outcomes.
Enforce the verified decision.
Example — insurance claim authorisation
An autonomous system requests permission to approve an insurance claim. The applicable policy requires verified identity, valid delegated authority and an approval limit of $5,000.
authorised r holds only when all four conditions hold together.
The examples are illustrative and have not been executed through the Lean compiler.
structure Request where
identityVerified : Bool
authorityValid : Bool
revoked : Bool
amount : Nat
limit : Nat
def authorised (r : Request) : Prop :=
r.identityVerified = true ∧
r.authorityValid = true ∧
r.revoked = false ∧
r.amount ≤ r.limit
Any request that satisfies the policy has an amount within its limit: the fourth conjunct of authorised r.
theorem no_excess_approval
(r : Request)
(h : authorised r) :
r.amount ≤ r.limit := by
exact h.2.2.2
Any request that satisfies the policy carries authority that has not been revoked: the third conjunct.
theorem no_revoked_authority
(r : Request)
(h : authorised r) :
r.revoked = false := by
exact h.2.2.1
These theorems establish properties of the formal policy for all possible inputs, rather than merely testing selected scenarios.
Cedar denies by default, and a matching forbid overrides any permit, a property its authors prove in Lean as forbid_trumps_permit. Revocation therefore sits in its own forbid policy.
Cedar trusts the context it is given. Here that context would be filled from verified KERI and ACDC evidence.
// Approve a claim within the delegated limit
permit (
principal,
action == Action::"approveClaim",
resource is Claim
)
when {
context.identityVerified &&
context.authorityValid &&
resource.amount <= context.approvalLimit
};
// Revoked authority can never be used
forbid (principal, action, resource)
when { context.authorityRevoked };
Interactive authorisation model
Change the claim, the delegated limit or the evidence, and the decision follows. Every condition is one conjunct of authorised r.
Decision
Permitted
All four conditions hold, so authorised r is satisfied.
AuthZEN response
{ "decision": true }
Conditions
r.identityVerified = true
r.authorityValid = true
r.revoked = false
r.amount ≤ r.limit · $3,500 ≤ $5,000
Simulation of the policy semantics, not a live Lean proof engine.
What Lean could prove about an AuthZ system
These guarantees depend on correctly modelling the properties and ensuring the deployed implementation conforms to the verified model.
Each property, once modelled, can be stated as a theorem about the decision function.
No authority means no access.
Access remains within granted scope.
Delegated authority cannot exceed parent authority.
Revoked credentials cannot authorise actions.
Expired authority cannot be exercised.
Authority cannot cross unauthorised organisational boundaries.
An entity cannot perform conflicting roles.
Identical inputs and policy produce identical decisions.
Defined classes of contradictory rules are prevented.
Cedar's Lean proofs cover several of these properties for its authoriser and validator. Its symbolic analyses, such as policy equivalence, are proved sound and complete against its semantics.
A request that no policy explicitly permits is denied. Guarantee 01.
An explicitly forbidden request is denied whatever else permits it. The basis for guarantee 04.
Reordering or duplicating policies cannot change a decision. Supports guarantee 08.
When policies, request and entities validate against the schema, evaluation cannot fail with a type error.
Two levels of formal verification
AuthZEN does not currently require such proofs. Level 2 would be a proposed extension or companion protocol.
Level 1
Verified authorisation engine
Use Lean during development to prove properties of the decision engine. Execute the verified decision function at runtime.
Precedent: Cedar. AWS's open-source policy language is built this way. Its evaluator, authoriser and validator are modelled and proved in Lean, and the Rust engine is checked against those models with millions of random inputs before each release. It proves the engine, not individual decisions: that is Level 2.
Level 2
Proof-carrying authorisation
Produce a machine-checkable proof for an individual authorisation decision, bound to the request, credential evidence, policy version and context.
This could allow another system to independently verify not only who authorised an action, but why that action was permitted.
The broader opportunity
For the selfdriven and entityOS architecture, this establishes four distinct layers of trust.
Each layer answers a different question, and none can stand in for another.
Lean cannot establish
Whether a real-world claim is truthful, or whether a credential issuer is trustworthy.
Lean can establish
That a decision logically follows from the accepted evidence and formal rules.
The opportunity is Proof-Carrying Authorisation (PCA): an architecture where authority is not merely asserted, but demonstrated through cryptographic evidence and formally verified reasoning.
References
The AuthZEN Authorization API 1.0 was approved as an OpenID Final Specification in January 2026.
The ideas on this page, in audio — verified authority in place of identity, and verifiable authority for autonomous AI.
Podcast
Replacing Identity with Mathematically Verified Authority
selfdriven ID Research
Download the audio (m4a)Podcast
Securing Autonomous AI with Verifiable Authority
selfdriven ID Research
Download the audio (m4a)The specification, the prover, Cedar's verified engine and the architecture this page builds on.