Crate cedar_policy

source ·
Expand description

Public Rust interface for Cedar

Modules

  • This module contains all of the standard Cedar extensions.
  • Frontend utilities, see comments in the module itself

Structs

  • Authorizer object, which provides responses to authorization queries
  • the Context object for an authorization request
  • Diagnostics providing more information on how a Decision was reached
  • Represents an entity hierarchy, and allows looking up Entity objects by Uid.
  • Entity datatype
  • unique identifier portion of the EntityUid type
  • Represents a namespace
  • Represents a concatenation of Namespaces and TypeName
  • Unique Id for an entity, such as User::"alice"
  • Expressions to be evaluated
  • Multiple related parse errors.
  • Structure for a Policy. Includes both static policies and template-linked policies.
  • Unique Ids assigned to policies and templates
  • Represents a set of Policys
  • A record of Cedar values
  • Represents the request tuple <P, A, R, C> (see the Cedar design doc).
  • Authorization response returned from the Authorizer
  • “Restricted” expressions are used for attribute values and context.
  • Object containing schema information used by the validator.
  • Contains all the type information used to construct a Schema that can be used to validate a policy.
  • Sets of Cedar values
  • Identifier for a Template slot
  • Represents a location in Cedar policy source.
  • Policy template datatype
  • 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.
  • 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.
  • Warnings found in Cedar policies
  • Validator object, which provides policy validation and typechecking.

Enums

Functions

  • Scan a set of policies for potentially confusing/obfuscating text.
  • Evaluates an expression. 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