This file defines entity slicing at a level
@[irreducible]
Equations
- (Cedar.Spec.Value.prim (Cedar.Spec.Prim.entityUID uid)).sliceEUIDs = Cedar.Data.Set.singleton uid
- (Cedar.Spec.Value.record (Cedar.Data.Map.mk avs)).sliceEUIDs = avs.mapUnion₃ fun (e : { x : Cedar.Spec.Attr × Cedar.Spec.Value // sizeOf x.snd < 1 + (1 + sizeOf avs) }) => e.val.snd.sliceEUIDs
- (Cedar.Spec.Value.prim p).sliceEUIDs = ∅
- (Cedar.Spec.Value.set s).sliceEUIDs = ∅
- (Cedar.Spec.Value.ext x_1).sliceEUIDs = ∅
Instances For
Equations
Instances For
Equations
Instances For
Executable check deciding whether es is closed at a level for request r:
every entity reachable from the request roots within level dereferences is
present in es. It reuses the reachable-entity set computed by the slicing
algorithm (Entities.sliceAtLevel.sliceAtLevel, which collects every entity
reachable in level hops, whether or not it is present) and checks that each is
actually in the store.
Cedar.Thm.closedAtLevel_iff proves this returns true exactly when the
EntitiesClosedAtLevel predicate holds, so a Cedar user can run this to obtain
the issue-#642 guarantee: a level-validated policy set evaluated against a store
passing this check never errors with entityDoesNotExist.
Equations
- es.closedAtLevel r level = Cedar.Data.Set.all (Cedar.Data.Map.contains es) (Cedar.Spec.Entities.sliceAtLevel.sliceAtLevel es r.sliceEUIDs level)