oso 0.12.1

Core

Other bugs & improvements

  • Correct data filtering bug causing “Unexpected bound variable in constraint” errors on some policies using negation.

Rust

derive(PolarClass) is now supported on Rust enums

Rust enums can use the PolarClass derive macro to register as a Polar class. Variants of the enum are registered in Polar as constants. For example, the enum:

#[derive(Clone, Debug, PartialEq, PolarClass)]
enum Role {
    Admin,
    Member,
}

is referenced in Polar as:

allow(actor, _, resource) if actor.role == Role::Admin;

Only unit variants are supported currently. Thanks to @seanchen1991 for this contribution!

sqlalchemy_oso 0.6.1

Other bugs & improvements

  • Fixed bug in authorize_model leading to data filtering queries to have a filter even when one policy result was unconditionally true.

Connect with us on Slack

If you have any questions, or just want to talk something through, jump into Slack. An Oso engineer or one of the thousands of developers in the growing community will be happy to help.