Skip to content

Commit

Permalink
Release 0.13.0 (#986)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabe Jackson <[email protected]>
  • Loading branch information
gj and gj authored Jun 22, 2021
1 parent bddb4e0 commit c1cff36
Show file tree
Hide file tree
Showing 23 changed files with 155 additions and 136 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.4
0.13.0
4 changes: 2 additions & 2 deletions docs/content/any/project/changelogs/2021-06-09.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ description: >-
bug fixes, and more.
---

## `oso` v0.12.4
## `oso` 0.12.4

### Other bugs & improvements

- Fixed bug with dot lookups in the head of a rule ([#933](https://github.com/osohq/oso/pull/933)).
- Fixed some memory leaks in the go library ([#944](https://github.com/osohq/oso/issues/944)).

## `sqlalchemy_oso` v0.8.0
## `sqlalchemy_oso` 0.8.0

### Core

Expand Down
104 changes: 0 additions & 104 deletions docs/content/any/project/changelogs/2021-06-18.md

This file was deleted.

123 changes: 123 additions & 0 deletions docs/content/any/project/changelogs/2021-06-22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: Release 2021-06-22
menuTitle: 2021-06-22
any: true
description: >-
Changelog for Release 2021-06-22 (oso 0.13.0, sqlalchemy-oso 0.9.0)
containing new features, bug fixes, and more.
---

## `oso` 0.13.0

### Core

#### Breaking changes

Attempting to create a dictionary with a repeated key is now a parser error.
Previously, the first (key, value) pair would be taken and the others would be
dropped.

Before:

```polar
query> d = {a: 1, a: 2}
d = {'a': 1}
```

After:

```polar
query> d = {a: 1, a: 2}
ParserError
Duplicate key: a at line 1, column 6
```

#### Other bugs & improvements

Trailing commas are now supported in dictionaries and lists. For example:

```polar
allow(_user, action, repository: Repository) if
action in [
"read",
"write",
];
```

### Node.js & Python

#### New features

##### Built-in Role-Based Access Control (RBAC) policy

<!-- TODO(gj): usual caveat about this being an experimental feature; talk to us
if you want to use it in prod. -->

<!-- TODO(gj): link to new docs -->

### Ruby

#### Breaking changes

{{% callout "Warning" "orange" %}}
This release contains breaking changes. Be sure to follow migration steps
before upgrading.
{{% /callout %}}

The `Query` object returned by `Polar::Polar#query` is now an `Enumerable`.
Previously, you would need to access the `results` attribute which was an
enumerator.

The main impact of this change is that queries are no longer run on a Fiber, and
therefore any methods using Fiber-local variables (e.g. `Thread.current[:var]`)
will work fine.

If you are only using `Oso#allowed?` there is no change needed.

Before:

```ruby
query = oso.query_rule('allow', actor, action, resource)
first = query.results.next
# raises StopIterator if no results
```

After:

```ruby
query = oso.query_rule('allow', actor, action, resource)
first = query.first
# first is nil if there are no results
```

### Java

#### Other bugs & improvements

Thanks to the ever-helpful [`@joshrotenberg`](https://github.com/joshrotenberg)
for a pair of contributions:

- Making sure the `junit` dependency doesn't get packaged in our released JARs
([#964](https://github.com/osohq/oso/pull/964)).
- Starting to align the Java test suite with the other language test suites
([#967](https://github.com/osohq/oso/pull/967)).

## `sqlalchemy-oso` 0.9.0

### Breaking changes

{{% callout "Warning" "orange" %}}
This release contains breaking changes. Be sure to follow migration steps
before upgrading.
{{% /callout %}}

#### Renamed `parent` and `user_in_role` predicates for Role-Based Access Control policies

Two built-in Polar predicates used for [implementing Role-Based Access
Control]({{< ref path="/new-roles/" lang="python" >}}) have been renamed for
clarity and consistency:

- The `parent(child, parent)` predicate has been renamed to
`parent_child(parent, child)`.
- The `user_in_role(actor, role, resource)` predicate has been renamed to
`actor_can_assume_role(actor, role, resource)`.
2 changes: 1 addition & 1 deletion docs/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ JS_DIR := $(OSO_ROOT)/languages/js
RUBY_DIR := $(OSO_ROOT)/languages/ruby

# Needed for tests
JAVA_PACKAGE_JAR_PATH := $(JAVA_DIR)/oso/target/oso-0.12.4.jar
JAVA_PACKAGE_JAR_PATH := $(JAVA_DIR)/oso/target/oso-0.13.0.jar

export BUNDLE_GEMFILE := $(RUBY_DIR)/Gemfile

Expand Down
2 changes: 1 addition & 1 deletion languages/java/oso/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>com.osohq</groupId>
<artifactId>oso</artifactId>
<version>0.12.4</version>
<version>0.13.0</version>

<distributionManagement>
<snapshotRepository>
Expand Down
2 changes: 1 addition & 1 deletion languages/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oso",
"version": "0.12.4",
"version": "0.13.0",
"description": "oso authorization library.",
"bin": "bin/repl.js",
"main": "dist/src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion languages/python/django-oso/django_oso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from .oso import Oso

__version__ = "0.8.0"
__version__ = "0.9.0"

default_app_config = "django_oso.apps.DjangoOsoConfig"
2 changes: 1 addition & 1 deletion languages/python/django-oso/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
oso~=0.12.0
oso~=0.13.0
django>=2.2
4 changes: 2 additions & 2 deletions languages/python/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
project = "oso"
copyright = "2020-2021 Oso Security, Inc"
author = "oso"
version = "0.12"
release = "0.12.4"
version = "0.13"
release = "0.13.0"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion languages/python/flask-oso/flask_oso/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.9.0"
__version__ = "0.10.0"

from .flask_oso import FlaskOso
from .decorators import authorize, skip_authorization
Expand Down
2 changes: 1 addition & 1 deletion languages/python/flask-oso/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
oso~=0.12.0
oso~=0.13.0
flask>=0.12.0
2 changes: 1 addition & 1 deletion languages/python/oso/oso/oso.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Core oso functionality"""

__version__ = "0.12.4"
__version__ = "0.13.0"

import os
from polar import Polar, Variable, exceptions
Expand Down
2 changes: 1 addition & 1 deletion languages/python/sqlalchemy-oso/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
oso~=0.12.4
oso~=0.13.0
SQLAlchemy>=1.3.17,<1.5
packaging~=20.9
dataclasses; python_version<"3.7"
2 changes: 1 addition & 1 deletion languages/python/sqlalchemy-oso/sqlalchemy_oso/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.8.0"
__version__ = "0.9.0"


from .auth import register_models
Expand Down
2 changes: 1 addition & 1 deletion languages/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
oso-oso (0.12.4)
oso-oso (0.13.0)
ffi (~> 1.0)

GEM
Expand Down
2 changes: 1 addition & 1 deletion languages/ruby/lib/oso/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Oso
VERSION = '0.12.4'
VERSION = '0.13.0'
end
2 changes: 1 addition & 1 deletion languages/rust/oso-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Apache-2.0"
homepage = "https://github.com/osohq/oso"
readme = "README.md"

version = "0.12.4"
version = "0.13.0"

edition = "2018"

Expand Down
Loading

1 comment on commit c1cff36

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: c1cff36 Previous: bddb4e0 Ratio
rust_get_attribute 63746 ns/iter (± 3296) 62911 ns/iter (± 7025) 1.01
n_plus_one/100 3089010 ns/iter (± 136890) 2814577 ns/iter (± 127676) 1.10
n_plus_one/500 14864177 ns/iter (± 485793) 13938395 ns/iter (± 782029) 1.07
n_plus_one/1000 29830226 ns/iter (± 1403756) 25852637 ns/iter (± 1252540) 1.15
unify_once 1013 ns/iter (± 72) 895 ns/iter (± 82) 1.13
unify_twice 2900 ns/iter (± 103) 2532 ns/iter (± 188) 1.15
many_rules 74405 ns/iter (± 5141) 63261 ns/iter (± 6344) 1.18
fib/5 619133 ns/iter (± 21566) 531020 ns/iter (± 50096) 1.17
prime/3 24894 ns/iter (± 1646) 21572 ns/iter (± 1712) 1.15
prime/23 25044 ns/iter (± 2628) 21329 ns/iter (± 1629) 1.17
prime/43 24933 ns/iter (± 4820) 22061 ns/iter (± 1366) 1.13
prime/83 24885 ns/iter (± 1885) 21757 ns/iter (± 2206) 1.14
prime/255 22297 ns/iter (± 2699) 19628 ns/iter (± 1799) 1.14
indexed/100 7265 ns/iter (± 1825) 5920 ns/iter (± 1818) 1.23
indexed/500 10046 ns/iter (± 1901) 7123 ns/iter (± 2071) 1.41
indexed/1000 11349 ns/iter (± 2066) 9358 ns/iter (± 1187) 1.21
indexed/10000 31700 ns/iter (± 3151) 26050 ns/iter (± 264254) 1.22
not 7492 ns/iter (± 281) 6991 ns/iter (± 535) 1.07
double_not 17057 ns/iter (± 1964) 16028 ns/iter (± 1523) 1.06
De_Morgan_not 10206 ns/iter (± 769) 8965 ns/iter (± 665) 1.14
load_policy 1024799 ns/iter (± 50096) 977941 ns/iter (± 76512) 1.05
partial_and/1 30831 ns/iter (± 3125) 31815 ns/iter (± 6130) 0.97
partial_and/5 115809 ns/iter (± 6307) 105695 ns/iter (± 22710) 1.10
partial_and/10 247373 ns/iter (± 9321) 226261 ns/iter (± 17077) 1.09
partial_and/20 616866 ns/iter (± 51964) 562287 ns/iter (± 36603) 1.10
partial_and/40 1745922 ns/iter (± 75049) 1455207 ns/iter (± 83872) 1.20
partial_and/80 5746315 ns/iter (± 308698) 4676316 ns/iter (± 367111) 1.23
partial_and/100 8336991 ns/iter (± 482988) 6800792 ns/iter (± 473980) 1.23
partial_rule_depth/1 107264 ns/iter (± 6935) 93059 ns/iter (± 7249) 1.15
partial_rule_depth/5 390026 ns/iter (± 30380) 324832 ns/iter (± 24918) 1.20
partial_rule_depth/10 969118 ns/iter (± 49857) 825533 ns/iter (± 50274) 1.17
partial_rule_depth/20 3212890 ns/iter (± 133929) 2674716 ns/iter (± 167128) 1.20
partial_rule_depth/40 14242138 ns/iter (± 1168442) 10670385 ns/iter (± 633528) 1.33
partial_rule_depth/80 89007124 ns/iter (± 3215749) 76743887 ns/iter (± 4492402) 1.16
partial_rule_depth/100 161507041 ns/iter (± 3842706) 142928358 ns/iter (± 8227845) 1.13

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.