All notable changes to Cedar CLI tool will be documented in this file. Changes to the Cedar language, which are likely to affect users of the CLI, are documented separately in the primary changelog.
- Add
tpecommand to run type-aware partial evaluation under feature flagtpe(#1894)
- New
run-testscommand to run policy tests in JSON format (#1641)
- Added
json-to-cedardirection totranslate-policycommand. (#1510, resolving #461) - Added
--leveloption to thevalidatecommand, exposing level validation through the CLI. (#1508, resolving #1501) - Improved the
check-parsecommand, which now checks the parse of policies, schema, and/or entities (whatever is passed). (#1548)
- Add schema options
schemaandschema-formatfor thepartially-authorizecommand (#1416, resolving #1332)
- The formatter will now consistently add a trailing newline, and checking if a
file is formatted with
--checkwill require a trailing newline. (resolving #1217)
- Add a command
language-versionto print the Cedar language version (#1219)
- The default
--schema-formatis nowcedarfor all subcommands that take--schema-format. (#750) - The
--partial-validateoption has been replaced with--validation-mode, taking the valuesstrict,permissive(new) andpartial. The latter two are kept behind their respective feature flags. (#915) - CLI arguments
--policy-formatand--schema-formatnow take optionscedarorjson, as opposed tohumanorjson. Similarly,--directiontakescedar-to-jsonorjson-to-cedar. (#1114)
- The
translate-schemacommand will now fail when trying to convert a schema to the Cedar schema format where any namespaced type name collides with an unqualified type. (#1212, resolving #1063) This does not change what schema in either format are accepted by the other commands.
translate-policycommand that translates a policy set in its Cedar format to the JSON format (except comments). (#987)visualizecommand that allows entity JSON files to be visualized using the graphviz format. (#960)- All commands that read policies in JSON format now accept a policy set in addition to a single policy or a policy template. (#1057)
- experimental
partially-authorizecommand (#1082)
- A
--writeflag for theformatsubcommand. This flag writes the formatted policy to the file specified by the--policiesflag. (#795) - A
--checkflag for theformatsubcommand. This flag checks if the policy is already formatted and exits with a non-zero status if it is not. (#798, resolving #796)
- The
translate-schemacommand now produces prettier output.
Now uses Cedar language version 3.1.0.
- Added support for the human-readable schema format (
--schema-format humanwhen a schema is needed). The default schema format is still JSON for backward compatibility. - Added command
translate-schemathat translates a schema in the JSON format to its human-readable format and vice versa (except comments). - The
-p/--policiesflag can now be omitted across all subcommands where it is present. If the flag is omitted, policies will be read fromstdin. --policy-formatflag to many subcommands, allowing you to pass policies in JSON format. The default remainshumanformat.- The
validatecommand now takes a--template-linked/-koptional argument, allowing you to validate template-linked policies. - The
check-parsecommand also now takes a--template-linked/-koptional argument, allowing you to check whether a template-linked-policies file parses. - The
--template-linked/-kargument is now also optional tolink(previously required). If not provided, the linked policy will only be shown on stdout; if it is provided, the indicated file will be updated with the new link (as before). - The
evaluatecommand now shows source spans on parse errors.
- The
linkcommand now accepts templates in the Cedar JSON (EST) syntax.
Now uses Cedar language version 3.0.0.
--deny-warningsoption tovalidatecommand. This option turns non-fatal warnings into errors.- Requests are now validated by default if a schema is provided. This can be
disabled with
--request-validation=false. - The
-sshort form can now be used for--schemaacross all subcommands.
- The
-pflag now always refers to--policies(not--principal) across all subcommands, while-lrefers to--principal. Relatedly, the--policieslong form of the flag is also now accepted across all subcommands. - The short form of
--template-linkedwas changed from-tto-k. - The
formatsubcommand no longer takes a positional file argument.
Now uses Cedar language version 2.1.3.
Now uses Cedar language version 2.1.2.
Now uses Cedar language version 2.1.1.
- Input policies for
check-parsecommand can be read from standard input.
- Duplicate policy ids in
@idannotations cause the CLI to exit gracefully instead of panicking.
Now uses Cedar language version 2.1.0.
- Update
cedar-policyandcedar-policy-coredependencies.
- Update
cedar-policyandcedar-policy-formaterdependencies.
- Resolve warning in
Cargo.tomldue to having bothlicenseandlicense-filemetadata entries.
- Update
Cargo.tomlmetadata to correctly represent this crate as Apache-2.0 licensed.
Initial release of cedar-policy-cli.
Uses Cedar language version 2.0.0.