Skip to main content

Crate cedarling

Crate cedarling 

Source
Expand description

§Cedarling

The Cedarling is a performant local authorization service that runs the Rust Cedar Engine. Cedar policies and schema are loaded at startup from a locally cached “Policy Store”. In simple terms, the Cedarling returns the answer: should the application allow this action on this resource given these JWT tokens. “Fit for purpose” policies help developers build a better user experience. For example, why display form fields that a user is not authorized to see? The Cedarling is a more productive and flexible way to handle authorization.

Modules§

authorization_config
Authorization config module
jwt_config
JWT config module
lock_config
Lock config module
log_config
Log config module
policy_store_config
Policy store config module
raw_config
Raw config module

Structs§

AuthorizationConfig
Configuration to specify authorization workflow.
AuthorizeMultiIssuerRequest
Multi-issuer authorization request
AuthorizeResult
Result of authorization and evaluation cedar policy based on the policy store and an optional principal from the request.
BatchAuthorizeMultiIssuerRequest
Batch multi-issuer authorization request.
BatchAuthorizeResponse
Response wrapper for batch authorization calls.
BatchAuthorizeUnsignedRequest
Batch unsigned authorization request.
BatchItem
A single item in a batch authorization request.
BootstrapConfig
Bootstrap configuration properties for configuration Cedarling application. link to the documentation.
BootstrapConfigRaw
Struct that represent mapping mapping Bootstrap properties to be JSON and YAML compatible from link
CedarEntityMapping
Cedar entity mapping information
CedarValueMapper
Mapper for bidirectional JSON ↔ Cedar value conversion.
Cedarling
The instance of the Cedarling application. It is safe to share between threads.
DataEntry
A data entry in the DataStore with value and metadata.
DataStoreConfig
Configuration for the DataStore component.
DataStoreStats
Statistics about the DataStore.
DataValidator
Validator for JSON data against Cedar type constraints.
EntityData
Cedar policy entity data fields represent EntityUid
HttpClientConfig
Configuration for [HttpClient] — controls retry behavior and per-request timeout.
JwtConfig
The set of Bootstrap properties related to JWT validation.
LockServiceConfig
Lock service config
LockServiceConfigRaw
Raw lock service config
LogConfig
A set of properties used to configure logging in the Cedarling application.
MemoryLogConfig
Configuration for memory log.
MultiIssuerAuthorizeResult
Result of multi-issuer authorization This result structure contains a single Cedar policy evaluation response
PolicyId
Identifier of a Cedar policy, re-exported from cedar_policy so callers can pass the policy IDs from response.diagnostics().reason() to the annotation lookup methods without depending on cedar_policy directly. Unique ids assigned to policies and templates.
PolicyMetadata
Metadata about a single Cedar policy.
PolicyStoreConfig
PolicyStoreConfig - Configuration for the policy store.
PolicyStoreConfigRaw
Raw policy store config
RequestUnsigned
Authorization request data with an optional principal.
TokenInput
Token input for multi-issuer authorization
ValidationConfig
Configuration for validation constraints.
ValidationResult
Result of validation with optional collected errors.

Enums§

AuthorizeError
Error type for Authorization Service
BatchItemError
Per-item build failure surfaced inside a batch authorize response at results[item_index] = Err(_). Serializable + Clone-able so bindings can round-trip it through JSON / FFI; the variant tag is the wire discriminant.
BootstrapConfigLoadingError
Represents errors that may occur while loading a BootstrapConfig from a file.
CedarType
Represents the type of a Cedar value based on JSON structure.
ConfigValidationError
Error returned when DataStoreConfig validation fails.
DataError
Errors that can occur during data store operations.
ExtensionValue
Represents a detected extension type with its parsed value.
FeatureToggle
Enum varians that represent if feature is enabled or disabled
InitCedarlingError
Errors that can occur during initialization Cedarling.
LockTransport
Transport protocol for Lock Server communication
LogLevel
Log levels Fatal level is the highest, trace is lowest
LogTypeConfig
Log type configuration. CEDARLING_LOG_TYPE in bootstrap properties documentation. Current type represent this value.
PolicyEffect
The effect of a Cedar policy: either Permit or Forbid.
PolicyStoreSource
PolicyStoreSource represents the source from which policies will be retrieved.
ValidationError
Errors that can occur during validation.
ValueMappingError
Errors that can occur during value mapping operations.

Traits§

DataApi
Trait defining the public API for data store operations.
LogStorage
Log Storage interface for getting log entries from the storage
TrustedIssuerLoadingInfo
Provides information about the loading status of trusted issuers.