github osohq/oso v0.25.0
oso 0.25.0

latest releases: v0.27.3, v0.27.2, v0.27.1...
2 years ago

oso 0.25.0

Core

Breaking changes

POLAR_LOG now supports multiple log levels

  • Previously we supported POLAR_LOG=trace and POLAR_LOG=on, both of which enabled slightly different but verbose "TRACE"-level logging of the execution of queries and their constituent goals within the Polar VM.
  • POLAR_LOG=on was slightly less verbose than POLAR_LOG=trace but still produced a voluminous output which made it hard to parse and follow the execution of a particular query.
  • To enable easier query debugging we have broken out POLAR_LOG into new discrete INFO and TRACE levels. Specifying POLAR_LOG=info will cause Polar to emit a more concise log output intended to be consumed by developers as they build and debug their Polar policies. The more verbose TRACE output is still available through POLAR_LOG=trace. Check out our documentation for more information on tracing.

Other bugs & improvements

  • Fixed a variable scope bug affecting the forall operator that caused affected
    queries to fail with an UnhandledPartial error.
  • Subsequent unification of incompatibly type-constrained variables will now fail
    correctly.
  • The operators not, forall, or, <, <=, >, and >= can now be used
    with data filtering.
  • Fixed an issue with incompatible types being assigned to variables during rule
    matching.

Node.js

Breaking changes

Second parameter of Oso.query() API changed from bindings to options

Pre-seeding the Polar VM with bindings for a query is a bit of an advanced use
case, but if you were previously passing bindings to Oso.query():

const bindings = new Map([['x', 1]]);
oso.query('f(x)', bindings);

You'll need to update that call to pass bindings as a key in the new
QueryOpts object:

const bindings = new Map([['x', 1]]);
oso.query('f(x)', { bindings });

Other bugs & improvements

  • Thanks to @Kn99HN for adding the
    acceptExpression query flag to the Node.js lib!

Python

New Features

New Data Filtering API

The improved data filtering API released for Ruby in 0.24.0 is now available
in the Python library, with a built-in example adapter for the SQLAlchemy ORM.
See the Python API docs for
more details.

sqlalchemy-oso 0.25.0

Bumped the minimum required version of the oso dependency.

Other bugs & improvements

  • scoped_session now correctly handles a get_checked_permissions callback that
    returns None.

django-oso 0.25.0

Bumped the minimum required version of the oso dependency.

flask-oso 0.25.0

Bumped the minimum required version of the oso dependency.

Don't miss a new oso release

NewReleases is sending notifications on new releases.