Expand description
The canonical, cross-layer policy AST and its compilers.
This module is the single source of truth for policy structure. It lives in
aa-security (a leaf crate) so that BOTH the gateway rule engine (L7) and
the privilege-separated eBPF loader (kernel) can depend on the exact same
types without a dependency cycle — aa-core already depends on
aa-security, so the AST cannot live in aa-core.
See AAASM-3606 (extract AST), AAASM-3607 (gateway consumes it), and AAASM-3608 (lower it to eBPF map entries).
§Layout
capability— thefile_read/network_outbound/mcp_tool:<n>capability vocabulary.document—PolicyDocumentand its sub-structures.- [
parse] — YAML parsing of thepolicy-exampleson-disk contract. ebpf— deterministic lowering of the AST to eBPF map entries (AAASM-3608, extended for syscalls by AAASM-3635).syscall— theSyscallAllowlistkernel-syscall node (AAASM-3624).
Re-exports§
pub use capability::Capability;pub use capability::CapabilitySet;pub use document::NetworkPolicy;pub use document::PolicyDocument;pub use document::ToolRule;pub use ebpf::lower_to_ebpf;pub use ebpf::EbpfRuleSet;pub use ebpf::PathRule;pub use ebpf::PathVerdict;pub use error::PolicyParseError;pub use syscall::Syscall;pub use syscall::SyscallAllowlist;
Modules§
- capability
- Capability vocabulary for the canonical policy AST.
- document
- The canonical, cross-layer policy AST.
- ebpf
- Deterministic lowering of the canonical
PolicyDocumentinto the flat rule set the eBPF maps consume (AAASM-3608). - error
- Errors raised while parsing the canonical policy AST.
- syscall
- Syscall-allowlist node for the canonical policy AST (AAASM-3624).