REPL, IDE Support, Testing and more - Cerbos v0.15 Release

Published by Alex Olivier on April 04, 2022
image

The latest release of Cerbos includes a new REPL for developing conditions for policies, rich IDE support for a better authoring experience and improvements to the testing framework.

REPL

Cerbos now ships with a REPL (read-evaluate-print-loop) for developing conditions for policies. It provides an interactive environment where all the Cerbos special variables like request can be set and referenced in CEL expressions to get immediate feedback about the effects of executing those expressions. When developing complex logic, the REPL should help policy authors save a lot of time in the prototyping stage. It’s available as a sub command of the Cerbos executable and can be run from the binary or the container by invoking cerbos repl. See the REPL documentation for more information.

IDE Support

Schemas describing the structure of the Cerbos policies are now publicly available and can be used with editors (VSCode, Jetbrains and more) that support schemas to make the policy editing experience better. Most editors, when configured with the schema URL, can provide context-sensitive hints, validation and other rich editing features for policies. See Policy authoring for more information about how to configure your editor.

Testing

One of the core features of Cerbos is the policy testing framework. This release includes many improvements to the test runner to make the test output easy to consume by both humans and automated tools. The default output produces a summarised view of the test run which is much more compact and easy to read. Failures and other details are rendered in a natural tree structure and the output can be customised in many ways. Engine traces for failed tests are now properly rendered as JSON for consumption by automated tools as well.


Additional updates include a new method in the Admin API and cerbosctl to reload policies on demand, an improved test server with all configuration options available and anonymous telemetry to to help Cerbos developers prioritise new features and improve existing ones

You can find the full release notes here and if you have any questions join our Slack community.

Book a free Policy Workshop to discuss your requirements and get your first policy written by the Cerbos team