Expand description
Loading a document: Cedar splits it into statements, and this module
holds each to the three rules plan/cedar-engine.md sets — every
statement carries a unique @id, every statement is a forbid with a
@reason, and every statement validates in strict mode against the
schema of each collection it can reach.
Structs§
- Document
- A loaded document: its statements keyed by
@id, and the policy set the authorizer runs, which is those statements plus the baseline permit. - Failure
- Why one statement, or the document as a whole, did not load.
- Load
Error - A document that did not load. Every failure the loader found, so the dashboard shows all of them at once.
- Statement
- One loaded forbid.
Enums§
- Principal
Need - How much a statement’s scope says about
principal, and therefore how much the gate must know about the account for the statement to be judged at all.
Constants§
- BASELINE_
ID - The id of the
permit(principal, action, resource)the server adds beside every document, so that a document’s forbids are the only thing that can turn a request down. Reserved: a statement may not use it.
Functions§
- actions_
of 🔒 - compared_
to 🔒 - Collect every string literal the expression compares
resource.<attr>to, by one ofopson either side or by[..].contains(resource.<attr>). - is_
resource_ 🔒attr - reads_
context 🔒 - Whether the expression reads or tests any of
attrsoncontext. - string_
literal 🔒 - unvalidated_
for 🔒 - The collections a statement reads records of without a shape to check them against, as the warning names them: each undescribed collection it names, or “any collection without a shape” when it names none.
- validation_
targets 🔒 - The schemas a statement is validated against, each labelled with the
collection whose record type it carries (
Nonefor the base schema).