Expand description
Public Rust interface for Cedar
Modules§
- extensions
- This module contains all of the standard Cedar extensions.
- frontend
- Frontend utilities, see comments in the module itself
Structs§
- Authorizer
- Authorizer object, which provides responses to authorization queries
- Context
- the Context object for an authorization request
- Diagnostics
- Diagnostics providing more information on how a
Decisionwas reached - Entities
- Represents an entity hierarchy, and allows looking up
Entityobjects by Uid. - Entity
- Entity datatype
- Entity
Id - unique identifier portion of the
EntityUidtype - Entity
Namespace - Represents a namespace
- Entity
Type Name - Represents a concatenation of Namespaces and
TypeName - Entity
Uid - Unique Id for an entity, such as
User::"alice" - Expression
- Expressions to be evaluated
- Parse
Errors - if you wrap a
Vec<ParseError>in this struct, it gains a Display impl that displays each parse error on its own line, indented. - Policy
- Structure for a
Policy. Includes both static policies and template-linked policies. - Policy
Id - Unique Ids assigned to policies and templates
- Policy
Set - Represents a set of
Policys - Record
- A record of Cedar values
- Request
- Represents the request tuple <P, A, R, C> (see the Cedar design doc).
- Response
- Authorization response returned from the
Authorizer - Restricted
Expression - “Restricted” expressions are used for attribute values and
context. - Schema
- Object containing schema information used by the validator.
- Schema
Fragment - Contains all the type information used to construct a
Schemathat can be used to validate a policy. - Set
- Sets of Cedar values
- SlotId
- Identifier for a Template slot
- Source
Location - Represents a location in Cedar policy source.
- Template
- Policy template datatype
- 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
Result - Contains the result of policy validation. The result includes the list of of issues found by the validation and whether validation succeeds or fails. Validation succeeds if there are no fatal errors. There are currently no non-fatal warnings, so any issues found will cause validation to fail.
- Validation
Warning - Warnings found in Cedar policies
- Validator
- Validator object, which provides policy validation and typechecking.
Enums§
- Action
Constraint - Head constraint on policy actions.
- Context
Json Error - Error type for parsing
Contextfrom JSON - Decision
- Decision returned from the
Authorizer - Effect
- the Effect of a policy
- Entities
Error - Error type for errors raised in entities.rs.
- Eval
Result - Result of Evaluation
- Evaluation
Error - Errors encountered while evaluating policies or expressions, or making authorization decisions.
- Policy
SetError - Potential errors when adding to a
PolicySet. - Policy
ToJson Error - Errors that can happen when getting the JSON representation of a policy
- Principal
Constraint - Head constraint on policy principals.
- Resource
Constraint - Head constraint on policy resources.
- Schema
Error - Errors encountered during construction of a Validation Schema
- Template
Principal Constraint - Head constraint on policy principals for templates.
- Template
Resource Constraint - Head constraint on policy resources for templates.
- Type
Error Kind - Represents the different kinds of type errors and contains information specific to that type error kind.
- Validation
Error Kind - Enumeration of the possible diagnostic error that could be found by the verification steps.
- Validation
Mode - Used to select how a policy will be validated.
- Validation
Warning Kind
Functions§
- confusable_
string_ checker - Scan a set of policies for potentially confusing/obfuscating text.
- eval_
expression - Evaluate If evaluation results in an error (e.g., attempting to access a non-existent Entity or Record, passing the wrong number of arguments to a function etc.), that error is returned as a String