1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Policy Expression Engine for Auths.
//!
//! This crate provides a composable policy expression language for authorization
//! logic. Policies are defined as expressions that can be serialized to JSON/TOML,
//! compiled into an efficient evaluation target, and evaluated against a context.
//!
//! # Architecture
//!
//! ```text
//! JSON/TOML file Rust types (validated)
//! ┌──────────┐ parse ┌──────────────┐ compile ┌────────────────┐
//! │ Expr │──────────▶│ Expr (AST) │────────────▶│ CompiledPolicy │
//! │ (serde) │ │ (strings) │ │ (typed/canon) │
//! └──────────┘ └──────────────┘ └────────────────┘
//! │
//! evaluate │
//! ▼
//! ┌──────────┐
//! │ Decision │
//! └──────────┘
//! ```
//!
//! # Modules
//!
//! - [`types`]: Canonical types for DIDs, capabilities, and glob patterns
//! - [`decision`]: Authorization decision types with structured reason codes
//! - [`expr`]: Serializable policy expression AST
//! - [`compiled`]: Compiled policy expressions ready for evaluation
//! - [`compile`]: Compile `Expr` to `CompiledPolicy`
//! - [`eval`]: Policy evaluation functions
//! - [`glob`]: Hardened glob matcher for path/ref matching
//! - [`context`]: Typed evaluation context
//! - [`enforce`]: Production enforcement with optional shadow evaluation
pub use ;
pub use PolicyBuilder;
pub use ;
pub use ;
pub use EvalContext;
pub use ;
pub use ;
pub use ;
pub use Expr;
pub use glob_match;
pub use ;
pub use ;