This file contains basic theorems about Cedar's authorizer.
Equations
- Cedar.Thm.PolicyIdsUnique policies = ∀ (p₁ : Cedar.Spec.Policy), p₁ ∈ policies → ∀ (p₂ : Cedar.Spec.Policy), p₂ ∈ policies → p₁.id = p₂.id → p₁ = p₂
Instances For
Equations
Instances For
A request is explicitly forbidden when there is at least one satisfied forbid policy.
Instances For
A request is explicitly permitted when there is at least one satisfied permit policy. Note that there may still be satisfied forbid policies leading to a deny decisions.
Instances For
Forbid trumps permit: if a forbid policy is satisfied, the request is denied.
A request is allowed only if it is explicitly permitted.
Default deny: if not explicitly permitted, the request is denied. This is contrapositive of allowed_only_if_explicitly_permitted.
A request is allowed if and only if it is explicitly permitted and is not explicitly forbidden.
A request is denied if and only if it is explicitly denied or it is not explicitly permitted.
Order and duplicate independence: isAuthorized produces the same result regardless of policy order or duplicates.
Adding a permit policy won't change an Allow decision.
Adding a forbid policy won't change a Deny decision.
The determining policies of a allow/deny decision are exactly the satisfied policies of permit/forbid resp.
If P is a determining policy, then adding a new policy resulting in the same decision won't change that.
If P is an erroring policy, then adding another policy won’t change that (even if the decision changes).
Determining policies and erroring policies of an isAuthorized response are disjoint when input policy IDs are unique.