Expand description
Validator for Cedar policies
Modules§
- The Cedar syntax for schemas
- Structures defining the JSON syntax for Cedar schemas
- Errors related to validation
- Error subtypes for
SchemaError
- Implements typechecking for Cedar policies. Typechecking is done using the
Typechecker
struct by calling thetypecheck_policy
method given a policy. - Defines the type structure for typechecking and various utilities for constructing and manipulating types.
- Defines errors returned by the validator.
- Defines warnings returned by the validator.
Structs§
- Holds the sets of all entity type, common type, and action definitions (fully-qualified names) in all fragments.
- Error parsing a Cedar-syntax schema
- A name which may refer to many possible different fully-qualified names, depending on which of them are declared (in any schema fragment)
- Struct which carries enough information that it can impl Core’s
ContextSchema
. - Struct which carries enough information that it can (efficiently) impl Core’s
Schema
- Struct which carries enough information that it can impl Core’s
EntityTypeDescription
- A newtype which indicates that the contained
InternalName
may not yet be fully-qualified. - Contains the result of policy validation. The result includes the list of issues found by validation and whether validation succeeds or fails. Validation succeeds if there are no fatal errors. There may still be non-fatal warnings present when validation passes.
- Structure containing the context needed for policy validation. This is currently only the
EntityType
s andActionType
s from a single schema. - Contains information about actions used by the validator. The contents of the struct are the same as the schema entity type structure, but the
member_of
relation is reversed to instead bedescendants
. - Contains entity type information for use by the validator. The contents of the struct are the same as the schema entity type structure, but the
member_of
relation is reversed to instead bedescendants
. - A single namespace definition from the schema JSON or Cedar syntax, processed into a form which is closer to that used by the validator. The processing includes detection of some errors, for example, parse errors in entity/common type names or entity/common types which are declared multiple times.
- Internal representation of the schema for use by the validator.
- A
ValidatorSchemaFragment
consists of any number (even 0) ofValidatorNamespaceDef
s.
Enums§
- Configurable validator behaviors regarding actions
- Error creating a schema from the Cedar syntax
- Describes whether a reference can resolve to a common-type name, an entity-type name, or both
- Error when the request does not conform to the schema.
- Error when constructing a schema
- An error generated by the validator when it finds a potential problem in a policy. The error contains a enumeration that specifies the kind of problem, and provides details specific to that kind of problem. The error also records where the problem was encountered.
- Used to select how a policy will be validated.
- Represents the different kinds of validation warnings and information specific to that warning.
Functions§
- Perform identifier and string safety checks.
- Since different Actions have different schemas for
Context
, you must specify theAction
in order to get aContextSchema
.
Type Aliases§
- Convenience alias