Expand description
FFI utilities, see comments in the module itself
Structs§
- Struct containing the input data for authorization
- Error (or warning) which occurred in a particular policy during authorization
- Wrapper around a JSON value describing a context. Expects the same format as
crate::Context::from_json_value
. See https://docs.cedarpolicy.com/auth/entities-syntax.html - Struct containing the input data for
check_parse_context()
- Structure of the JSON output representing one
miette
error - Interface version of
Diagnostics
that stores error messages and warnings in theDetailedError
format - Wrapper around a JSON value describing a set of entities. Expects the same format as
crate::Entities::from_json_value
. See https://docs.cedarpolicy.com/auth/entities-syntax.html - Struct containing the input data for
check_parse_entities()
- Wrapper around a JSON value describing an entity uid in either explicit or implicit
__entity
form. Expects the same format ascrate::EntityUid::from_json
. - Struct containing the input data for formatting
- Wrapper around
serde_json::Value
, with a differentDeserialize
implementation, such that duplicate keys in JSON objects (maps/records) are not allowed (result in an error). - Partial
Authorization Call partial-eval
Struct containing the input data for partial authorization - Represents a policy set, including static policies, templates, and template links
- 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.
- Represents a template-linked policy
- 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
- Result struct for syntax validation
- Result struct for formatting
- Partial
Authorization Answer partial-eval
Answer struct from partial-authorization call - Represents a static policy in either the Cedar or JSON policy format
- Result of converting a policy or template to JSON
- Result of converting a policy or template to the Cedar format
- Represents a schema in either the Cedar or JSON schema format
- Result of converting a schema to JSON
- Result of converting a schema to the Cedar format
- Exactly like
miette::Severity
but implementsHash
- Represents a set of static policies
- Represents a policy template in either the Cedar or JSON policy format.
- Result struct for validation
Functions§
- Check whether a context successfully parses.
- Check whether a context successfully parses. Input is a JSON encoding of
ContextParsingCall
and output is a JSON encoding ofCheckParseAnswer
. - Check whether a context successfully parses. Input and output are strings containing serialized JSON, in the shapes expected by
check_parse_context_json()
. - Check whether a set of entities successfully parses.
- Check whether a set of entities successfully parses. Input is a JSON encoding of
EntitiesParsingCall
and output is a JSON encoding ofCheckParseAnswer
. - Check whether a set of entities successfully parses. Input and output are strings containing serialized JSON, in the shapes expected by
check_parse_entities_json()
. - Check whether a policy set successfully parses.
- Check whether a policy set successfully parses. Input is a JSON encoding of
PolicySet
and output is a JSON encoding ofCheckParseAnswer
. - Check whether a policy set successfully parses. Input and output are strings containing serialized JSON, in the shapes expected by
check_parse_policy_set_json()
. - Check whether a schema successfully parses.
- Check whether a schema successfully parses. Input is a JSON encoding of
Schema
and output is a JSON encoding ofCheckParseAnswer
. - Check whether a schema successfully parses. Input and output are strings containing serialized JSON, in the shapes expected by
check_parse_schema_json()
. - Apply the Cedar policy formatter to a policy set in the Cedar policy format
- Apply the Cedar policy formatter. Input is a JSON encoding of
FormattingCall
and output is a JSON encoding ofFormattingAnswer
. - Apply the Cedar policy formatter. Input and output are strings containing serialized JSON, in the shapes expected by
format_json()
. - 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()
- Return the JSON representation of a policy.
- Return the Cedar (textual) representation of a policy.
- Return the JSON representation of a schema.
- Return the Cedar (textual) representation of a schema.
- Return the JSON representation of a template.
- Return the Cedar (textual) representation of a template.
- 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()