chio_api_protect/lib.rs
1//! Zero-code reverse proxy that protects HTTP APIs with Chio signed receipts.
2//!
3//! `chio api protect` reads an OpenAPI spec, generates a default Chio policy,
4//! and proxies all requests to the upstream API. Every request produces a
5//! signed `HttpReceipt`. Side-effect routes (POST/PUT/PATCH/DELETE) require
6//! a capability token; safe routes (GET/HEAD/OPTIONS) pass with audit receipts.
7
8mod error;
9mod evaluator;
10mod proxy;
11mod spec_discovery;
12
13pub use error::ProtectError;
14pub use evaluator::{EvaluationResult, RequestEvaluator, RouteEntry};
15pub use proxy::{ProtectConfig, ProtectProxy};
16pub use spec_discovery::{discover_spec, load_spec_from_file};