cedar_policy_validator

Module json_schema

Source
Expand description

Structures defining the JSON syntax for Cedar schemas

Structs§

  • Represents the cedar_policy_core::ast::EntityUID of an action
  • An ActionType describes a specific action entity. It also describes what principals/resources/contexts are valid for the action.
  • 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.
  • Declaration of entity or record attributes, or of an action context. These share a JSON format.
  • An UnreservedId that cannot be reserved JSON schema keywords like Set, Long, and etc.
  • 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.
  • 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].
  • Represents the type-level information about a record type.
  • Error when a common-type basename is reserved
  • 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§

  • A restricted version of the crate::types::Type enum containing only the types which are exposed to users.
  • All the variants of Type other than common types, which are handled directly in Type. See notes on Type for why it’s necessary to have a separate enum here.