26 stable releases

new 3.2.0 May 17, 2024
3.1.3 Apr 15, 2024
3.1.2 Mar 29, 2024
3.0.1 Dec 21, 2023
2.3.1 Jul 20, 2023

#192 in Configuration

Download history 7/week @ 2024-01-25 5/week @ 2024-02-01 2/week @ 2024-02-08 21/week @ 2024-02-15 69/week @ 2024-02-22 19/week @ 2024-02-29 241/week @ 2024-03-07 152/week @ 2024-03-14 97/week @ 2024-03-21 337/week @ 2024-03-28 260/week @ 2024-04-04 313/week @ 2024-04-11 171/week @ 2024-04-18 205/week @ 2024-04-25 211/week @ 2024-05-02 254/week @ 2024-05-09

897 downloads per month

Apache-2.0

630KB
13K SLoC

Cedar CLI

This package contains the Command Line Interface (CLI) for Cedar.

For more information about the Cedar language/project, please take a look at cedarpolicy.com. See also the cedar-policy package, which is the main public Rust API for Cedar.

This app uses the annotation @id("PID") as a simple way to define policy ids. This usage is not standard and annotations have custom use depending on the app.

Usage

CLI is a command line tool. It supports the following subcommands:

  • authorize: Evaluate an authorization request
  • evaluate: Evaluate a Cedar expression
  • validate: Validate a policy set against a schema
  • check-parse: Check that policies successfully parse
  • link: Link a template
  • format: Format a policy set
  • help: Print this message or the help of the given subcommand(s)

Build

You will need to install Rust, via rustup

To build the CLI, run cargo build or cargo build --release

Run

To run the CLI, try cargo run -- --help. The sub-folder sample-data contains examples for the CLI. Please refer to the instructions in each README.md to run the examples.

Dependencies

~19MB
~355K SLoC