Skip to main content

Module policy_engine

Module policy_engine 

Source
Expand description

Native TrustForge policy engine — Rust mirror of tools/tf-types-ts/src/core/policy-engine.ts.

Structs§

ContinuousReeval
NativePolicyEngine
PolicyDecision
PolicyManifest
PolicyQuery
PolicyRule
QuorumDefaults

Traits§

PolicyEngineImpl
A pluggable policy engine. Implemented by the native engine, the tf-cedar crate, and the tf-rego crate. Decoupling via a trait (rather than a feature-gated dependency on the adapter crates) lets tf-types stay lightweight while still letting the daemon dispatch the right engine for a given engine_hint.

Functions§

evaluate_with_engine
Dispatch a PolicyQuery to the appropriate backend based on engine_hint. Pass an explicit backend for the hints that need one; native falls back to the supplied native engine. When the requested hint has no backend wired in (e.g. caller didn’t construct a Cedar engine yet) the dispatcher returns a safe deny.