Symbolic Cedar Compiler (SymCC)
With this library, you can
- Compile Cedar policies to logical constraints in SMT-LIB.
- Formally verify a number of useful properties about your Cedar policies with concrete counterexamples.
Our symbolic compiler and verifiers have been formally modeled and verified in Lean to guarantee trustworthy verification results.
SymCC currently supports formally verifying the following properties:
- Policy never errors (
CedarSymCompiler::check_never_errors). - Policy set always allows (
CedarSymCompiler::check_always_allows). - Policy set always denies (
CedarSymCompiler::check_always_denies). - Policy set subsumption (
CedarSymCompiler::check_implies). - Policy set equivalence (
CedarSymCompiler::check_equivalent). - Policy set disjointness (
CedarSymCompiler::check_disjoint).
For each of them, we also have the CedarSymCompiler::check_*_with_counterexample counterparts that
produce a counterexample (a synthesized request and entity store) if the property is not true.
Setup
To get started, first download or compile the cvc5-1.3.1 SMT solver. The following example assumes that you have set the following environment variable:
CVC5=<path
Example
To verify that a policy set does not always allow every well-formed request:
use tokio;
use FromStr;
use ;
use ;
async
To learn more about what you can do with SymCC, see the documentation of the CedarSymCompiler type.
Development
To build and test this crate, run the following commands from the root of the repository:
CVC5=<absolute
Structure of this crate:
symccis the core library. It maps directly to the Lean model.lib.rsis the frontend forsymcc, and does not directly correspond to the Lean, but it provides an interface in terms ofcedar-policytypes rather thancedar-policy-coretypes.