Expand description
Structures defining the JSON syntax for Cedar schemas
Structs§
- Action
EntityUID - Represents the
cedar_policy_core::ast::EntityUID
of an action - Action
Type - An
ActionType
describes a specific action entity. It also describes what principals/resources/contexts are valid for the action. - Apply
Spec - The apply spec specifies what principals and resources an action can be used with. This specification can either be done through containing to entity types. An empty list is interpreted as specifying that there are no principals or resources that an action applies to.
- Attributes
OrContext - Declaration of entity or record attributes, or of an action context. These share a JSON format.
- Common
Type - Represents the definition of a common type in the schema.
- Common
Type Id - An
UnreservedId
that cannot be reserved JSON schema keywords likeSet
,Long
, and etc. - Entity
Type - Represents the full definition of an entity type in the schema. Entity types describe the relationships in the entity store, including what entities can be members of groups of what types, and what attributes can/should be included on entities of each type.
- Fragment
- A
Fragment
is split into multiple namespace definitions, and is just a map from namespace name to namespace definition (i.e., definitions of common types, entity types, and actions in that namespace). The namespace name is implicitly applied to all definitions in the corresponding [NamespaceDefinition
]. See [NamespaceDefinition
]. - Record
Type - Represents the type-level information about a record type.
- Reserved
Common Type Basename Error - Error when a common-type basename is reserved
- Type
OfAttribute - Used to describe the type of a record or entity attribute. It contains a the
type of the attribute and whether the attribute is required. The type is
flattened for serialization, so, in JSON format, this appears as a regular
type with one extra property
required
.
Enums§
- Type
- A restricted version of the
crate::types::Type
enum containing only the types which are exposed to users. - Type
Variant - All the variants of
Type
other than common types, which are handled directly inType
. See notes onType
for why it’s necessary to have a separate enum here.