Expand description
Validator for Cedar policies
Modules§
- cedar_
schema - The Cedar syntax for schemas
- json_
schema - Structures defining the JSON syntax for Cedar schemas
- request_
validation_ errors - Errors related to validation
- schema_
errors - Error subtypes for
SchemaError
- typecheck
- Implements typechecking for Cedar policies. Typechecking is done using
the
Typechecker
struct by calling thetypecheck_policy
method given a policy. - types
- Defines the type structure for typechecking and various utilities for constructing and manipulating types.
- validation_
errors - Defines errors returned by the validator.
- validation_
warnings - Defines warnings returned by the validator.
Structs§
- AllDefs
- Holds the sets of all entity type, common type, and action definitions (fully-qualified names) in all fragments.
- Cedar
Schema Parse Error - Error parsing a Cedar-syntax schema
- Conditional
Name - A name which may refer to many possible different fully-qualified names, depending on which of them are declared (in any schema fragment)
- Context
Schema - Struct which carries enough information that it can impl Core’s
ContextSchema
. - Core
Schema - Struct which carries enough information that it can (efficiently) impl Core’s
Schema
- Entity
Type Description - Struct which carries enough information that it can impl Core’s
EntityTypeDescription
- RawName
- A newtype which indicates that the contained
InternalName
may not yet be fully-qualified. - Validation
Result - 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.
- Validator
- Structure containing the context needed for policy validation. This is
currently only the
EntityType
s andActionType
s from a single schema. - Validator
Action Id - 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
. - Validator
Entity Type - 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
. - Validator
Namespace Def - 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.
- Validator
Schema - Internal representation of the schema for use by the validator.
- Validator
Schema Fragment - A
ValidatorSchemaFragment
consists of any number (even 0) ofValidatorNamespaceDef
s.
Enums§
- Action
Behavior - Configurable validator behaviors regarding actions
- Cedar
Schema Error - Error creating a schema from the Cedar syntax
- Reference
Type - Describes whether a reference can resolve to a common-type name, an entity-type name, or both
- Request
Validation Error - Error when the request does not conform to the schema.
- Schema
Error - Error when constructing a schema
- Validation
Error - 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.
- Validation
Mode - Used to select how a policy will be validated.
- Validation
Warning - Represents the different kinds of validation warnings and information specific to that warning.
Functions§
- confusable_
string_ checks - Perform identifier and string safety checks.
- context_
schema_ for_ action - Since different Actions have different schemas for
Context
, you must specify theAction
in order to get aContextSchema
.
Type Aliases§
- Result
- Convenience alias