Skip to main content

apl_core/
lib.rs

1// Location: ./crates/apl-core/src/lib.rs
2// Copyright 2025
3// SPDX-License-Identifier: Apache-2.0
4// Authors: Teryl Taylor
5//
6// APL core — Authorization Policy Language compiler + evaluator.
7//
8// This crate is the language nucleus. It does not depend on CPEX directly;
9// the bridge from cpex-core extensions into the AttributeBag lives in
10// `apl-cmf`, and the `PolicyEvaluator` implementation lives in `apl-cpex`.
11//
12// See docs/specs/apl-design.md for the full design.
13
14#![doc = "APL — Authorization Policy Language. See docs/specs/apl-design.md."]
15
16pub mod attributes;
17pub mod evaluator;
18pub mod parser;
19pub mod pipeline;
20pub mod plugin_decl;
21pub mod route;
22pub mod rules;
23pub mod step;
24
25pub use attributes::{AttributeBag, AttributeExtractor, AttributeValue};
26pub use evaluator::{
27    evaluate_effects, evaluate_pipeline, evaluate_rules, Decision, FieldOutcome, PipelineEvaluation,
28};
29pub use parser::{
30    compile_config, compile_policy_block_value, parse_pipeline, parse_predicate, parse_rule,
31    CompiledConfig, ConfigYaml, ParseError, RouteYaml,
32};
33pub use pipeline::{FieldRule, Pipeline, ScanKind, Stage, TaintEvent, TaintScope, TypeCheck};
34pub use plugin_decl::{
35    CapsView, EffectivePlugin, PluginDeclaration, PluginOverride, PluginRegistry,
36};
37pub use route::{evaluate_post, evaluate_pre, evaluate_route, RouteDecision, RoutePayload};
38pub use rules::{
39    CompareOp, CompiledRoute, Condition, DenyResponse, Effect, Expression, Literal, Phase,
40    PhaseSet, Rule,
41};
42pub use step::{
43    delegation_bag_keys, elicitation_bag_keys, AutoApprovingElicitor, DelegateStep,
44    DelegationError, DelegationInvoker, DelegationOutcome, DispatchPhase, ElicitKind, ElicitStep,
45    ElicitationDispatch, ElicitationError, ElicitationInvoker, ElicitationOutcome,
46    ElicitationStatus, ElicitationValidation, NoopDelegationInvoker, NoopElicitationInvoker,
47    PdpCall, PdpDecision, PdpDialect, PdpError, PdpFactory, PdpResolver, PendingElicitation,
48    PluginError, PluginInvocation, PluginInvoker, PluginOutcome,
49};