Module cedar_policy::ffi
source · Expand description
Functions for interacting with cedar_policy
, intended to be easier to use
in an FFI context than the root-level cedar_policy
interface
Structs§
- Struct containing the input data for authorization
- Error (or warning) which occurred in a particular policy during authorization
- Structure of the JSON output representing one
miette
error - Interface version of
Diagnostics
that stores error messages and warnings in theDetailedError
format - Residual
Response partial-eval
FFI version of acrate::PartialResponse
- Interface version of a
Response
that uses the interface version ofDiagnostics
- Structure of the JSON output representing a
miette
source label (range) - A range of source code representing the location of an error or warning.
- Struct containing the input data for validation
- Error (or warning) for a specified policy after validation
- Configuration for the validation call
Enums§
- Answer struct from authorization call
- Error returned for duplicate slot ids
- Partial
Authorization Answer partial-eval
Answer struct from partial-authorization call - Struct defining the two possible ways to pass a set of policies to
is_authorized_json
andvalidate_json
- Represents a schema in either schema format
- Exactly like
miette::Severity
but implementsHash
- Result struct for validation
- String enum for validation mode
Functions§
- Basic interface, using
AuthorizationCall
andAuthorizationAnswer
types - Input is a JSON encoding of
AuthorizationCall
and output is a JSON encoding ofAuthorizationAnswer
- Input and output are strings containing serialized JSON, in the shapes expected by
is_authorized_json()
- is_
authorized_ partial partial-eval
Basic interface for partial evaluation, usingAuthorizationCall
andPartialAuthorizationAnswer
types - is_
authorized_ partial_ json partial-eval
Input is a JSON encoding ofAuthorizationCall
and output is a JSON encoding ofPartialAuthorizationAnswer
- is_
authorized_ partial_ json_ str partial-eval
Input and output are strings containing serialized JSON, in the shapes expected byis_authorized_partial_json()
- Parse a policy set and optionally validate it against a provided schema
- Input is a JSON encoding of
ValidationCall
and output is a JSON encoding ofValidationAnswer
- Input and output are strings containing serialized JSON, in the shapes expected by
validate_json()