From 42f249a6ee654f0c7ce03c9bc08198d0100c1adf Mon Sep 17 00:00:00 2001 From: Gabe Jackson <17556281+gj@users.noreply.github.com> Date: Tue, 25 Jan 2022 12:46:28 -0500 Subject: [PATCH] 0.26.0 (#1508) Co-authored-by: gw --- .github/workflows/publish-docs.yml | 8 +- Cargo.lock | 12 +- VERSION | 2 +- .../any/project/changelogs/2022-01-26.md | 122 ++++++++++++++++++ docs/content/any/project/changelogs/NEXT.md | 65 ++-------- docs/examples/Makefile | 2 +- docs/spelling/allowed_words.txt | 1 + languages/java/oso/pom.xml | 2 +- languages/js/package.json | 2 +- .../python/django-oso/django_oso/__init__.py | 2 +- languages/python/django-oso/requirements.txt | 2 +- languages/python/docs/conf.py | 4 +- .../python/flask-oso/flask_oso/__init__.py | 2 +- languages/python/flask-oso/requirements.txt | 2 +- languages/python/oso/oso/oso.py | 2 +- .../python/sqlalchemy-oso/requirements.txt | 2 +- .../sqlalchemy-oso/sqlalchemy_oso/__init__.py | 2 +- languages/ruby/Gemfile.lock | 2 +- languages/ruby/lib/oso/version.rb | 2 +- languages/rust/oso-derive/Cargo.toml | 2 +- languages/rust/oso/Cargo.toml | 8 +- polar-c-api/Cargo.toml | 4 +- polar-core/Cargo.toml | 2 +- polar-language-server/Cargo.toml | 4 +- polar-wasm-api/Cargo.toml | 4 +- vscode/oso/package.json | 2 +- 26 files changed, 170 insertions(+), 94 deletions(-) create mode 100644 docs/content/any/project/changelogs/2022-01-26.md diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index f2e4abbaf1..89884b8158 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -6,16 +6,16 @@ on: description: "docs s3 path (docs.oso.dev or docs-preview.oso.dev)" oso_version: description: "oso release to build docs for" - default: "0.25.1" # oso_version + default: "0.26.0" # oso_version flask_oso_version: description: "flask oso release to build docs for" - default: "0.25.1" # flask_oso_version + default: "0.26.0" # flask_oso_version django_oso_version: description: "django oso release to build docs for" - default: "0.25.1" # django_oso_version + default: "0.26.0" # django_oso_version sqlalchemy_oso_version: description: "sqlalchemy oso release to build docs for" - default: "0.25.1" # sqlalchemy_oso_version + default: "0.26.0" # sqlalchemy_oso_version jobs: publish: name: Publish docs diff --git a/Cargo.lock b/Cargo.lock index 0c2e6a3dcf..5d16a2fa3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -655,7 +655,7 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "oso" -version = "0.25.1" +version = "0.26.0" dependencies = [ "anyhow", "clap", @@ -678,7 +678,7 @@ dependencies = [ [[package]] name = "oso-derive" -version = "0.25.1" +version = "0.26.0" dependencies = [ "quote", "syn", @@ -794,7 +794,7 @@ dependencies = [ [[package]] name = "polar-c-api" -version = "0.25.1" +version = "0.26.0" dependencies = [ "cbindgen", "polar-core", @@ -804,7 +804,7 @@ dependencies = [ [[package]] name = "polar-core" -version = "0.25.1" +version = "0.26.0" dependencies = [ "criterion", "indoc", @@ -824,7 +824,7 @@ dependencies = [ [[package]] name = "polar-language-server" -version = "0.25.1" +version = "0.26.0" dependencies = [ "console_error_panic_hook", "js-sys", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "polar-wasm-api" -version = "0.25.1" +version = "0.26.0" dependencies = [ "console_error_panic_hook", "js-sys", diff --git a/VERSION b/VERSION index af2dabf3ff..4e8f395fa5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.25.1 +0.26.0 diff --git a/docs/content/any/project/changelogs/2022-01-26.md b/docs/content/any/project/changelogs/2022-01-26.md new file mode 100644 index 0000000000..6069f126eb --- /dev/null +++ b/docs/content/any/project/changelogs/2022-01-26.md @@ -0,0 +1,122 @@ +--- +title: Release 2022-01-26 +menuTitle: 2022-01-26 +any: true +description: >- + Changelog for Release 2022-01-26 (oso 0.26.0, VS Code extension 0.26.0, + django-oso 0.26.0, flask-oso 0.26.0, sqlalchemy-oso 0.26.0) containing new + features, bug fixes, and more. +--- + +## `oso` 0.26.0 + +### Core + +#### Other bugs & improvements + +- Fixed a bug affecting runtime type checking on nested object attributes. +- When using data filtering, the list of relations returned to the adapter + is now topologically sorted. + +### Go + +#### Breaking changes + +{{% callout "Warning" "orange" %}} + This release contains breaking changes. Be sure to follow migration steps + before upgrading. +{{% /callout %}} + +##### Updated Go type checking behavior + +When evaluating whether a given query variable matches a Go type Polar will now use direct instance comparisons instead of Go's `reflect.ConvertibleTo` functionality. This change resolves false-positive type checking results where discrete structs with identical sets of fields were considered to be equivalent. + +This change has implications for the use of NewTypes in Polar rule definitions. Rules that are defined using NewTypes will now only match instances of the NewType and no longer match the underlying wrapped type. + +Rules which consume NewTypes must now be specialized over the NewType directly and not the underlying wrapped type. + +```go +type Action string +const ( + View Action = "view" + Create Action = "create" + Update Action = "update" +) +``` + +Where previously it was possible to utilize this `Action` type as interchangeable with that of `string`: + +```polar +user_has_action(user: User, action: String, resource: Resource) if ... +``` + +This rule definition must be rewritten as follows: + +```polar +user_has_action(user: User, action: Action, resource: Resource) if ... +``` + +#### New Features + +##### Data Filtering for Go + +Data filtering is now officially supported for Go! Check out +[our docs]({{< ref path="guides/data_filtering" lang="go" >}}) +for more details and usage information. + +#### Other bugs & improvements + +- Fixed regression in Go mod vendoring. Thank you + [`@sourcec0de`](https://github.com/sourcec0de)! + +### Python + +#### Breaking Changes + +##### `@polar_class` is deprecated in favor of `Oso#register_class` + +The `@polar_class` decorator used to register classes with Polar has been deprecated. To register a class with Polar it is now necessary to use the [`Oso#register_class`](https://docs.osohq.com/reference/api/index.html#oso.Oso.register_class) API. + +##### New data filtering configuration API is now mandatory + +The original data filtering configuration API using per-class `build_query`, `exec_query`, and `combine_query` methods +has been removed. Data filtering is now configured through [the new Adapter API]({{< ref path="guides/data_filtering" lang="python" >}}). + +### Ruby + +#### Breaking Changes + +{{% callout "Warning" "orange" %}} + This release contains breaking changes. Be sure to follow migration steps + before upgrading. +{{% /callout %}} + +##### New data filtering configuration API is now mandatory + +The original data filtering configuration API using per-class `build_query`, `exec_query`, and `combine_query` methods +has been removed. Data filtering is now configured through [the new Adapter API]({{< ref path="guides/data_filtering" lang="ruby" >}}). + +### Node.js + +#### Breaking Changes + +{{% callout "Warning" "orange" %}} + This release contains breaking changes. Be sure to follow migration steps + before upgrading. +{{% /callout %}} + +##### New data filtering configuration API is now mandatory + +The original data filtering configuration API using per-class `buildQuery`, `execQuery`, and `combineQuery` methods +has been removed. Data filtering is now configured through [the new Adapter API]({{< ref path="guides/data_filtering" lang="node" >}}). + +## VS Code extension 0.26.0 + +### New features + +#### Configuring which Polar files are treated as part of the same policy + +The `oso.polarLanguageServer.projectRoots` VS Code workspace configuration +setting can be used to control which Polar files in a particular workspace +folder are treated as part of the same Oso policy. For more details, see [the +docs](reference/tooling/ide#configuring-which-polar-files-are-treated-as-part-of-the-same-policy). diff --git a/docs/content/any/project/changelogs/NEXT.md b/docs/content/any/project/changelogs/NEXT.md index bf1624ec83..e2c15a74ed 100644 --- a/docs/content/any/project/changelogs/NEXT.md +++ b/docs/content/any/project/changelogs/NEXT.md @@ -3,65 +3,29 @@ title: Release YYYY-MM-DD menuTitle: YYYY-MM-DD any: true description: >- - Changelog for Release YYYY-MM-DD (oso 0.26.0, VS Code extension 0.26.0) - containing new features, bug fixes, and more. + Changelog for Release YYYY-MM-DD (RELEASED_VERSIONS) containing new features, + bug fixes, and more. draft: true --- -## `oso` 0.26.0 +## `RELEASED_PACKAGE_1` NEW_VERSION -### Core - -#### Other bugs & improvements - -- Fixed a bug affecting runtime type checking on nested object attributes. - -### Go +### LANGUAGE (e.g., 'Core' or 'Python' or 'Node.js') #### Breaking changes + + {{% callout "Warning" "orange" %}} This release contains breaking changes. Be sure to follow migration steps before upgrading. {{% /callout %}} -##### Updated Go type checking behavior - -When evaluating whether a given query variable matches a Go type Polar will now use direct instance comparisons instead of Go's `reflect.ConvertibleTo` functionality. This change resolves false-positive type checking results where discrete structs with identical sets of fields were considered to be equivalent. - -This change has implications for the use of NewTypes in Polar rule definitions. Rules that are defined using NewTypes will now only match instances of the NewType and no longer match the underlying wrapped type. - -Rules which consume NewTypes must now be specialized over the NewType directly and not the underlying wrapped type. - -```go -type Action string -const ( - View Action = "view" - Create Action = "create" - Update Action = "update" -) -``` - -Where previously it was possible to utilize this `Action` type as interchangeable with that of `string`: -```polar -user_has_action(user: User, action: String, resource: Resource) if ... -``` +##### Breaking change 1 -This rule definition must be rewritten as follows: +Summary of breaking change. -```polar -user_has_action(user: User, action: Action, resource: Resource) if ... -``` - -### Python - -#### Breaking Changes - -##### `@polar_class` is deprecated in favor of `Oso#register_class` - -The `@polar_class` decorator used to register classes with Polar has been deprecated. To register a class with Polar it is now necessary to use the [`Oso#register_class`](https://docs.osohq.com/reference/api/index.html#oso.Oso.register_class) API. - -### `LANGUAGE` +Link to [migration guide](). #### New features @@ -76,14 +40,3 @@ Link to [relevant documentation section](). - Bulleted list - Of smaller improvements - Potentially with doc [links](). - -## VS Code extension 0.26.0 - -### New features - -#### Configuring which Polar files are treated as part of the same policy - -The `oso.polarLanguageServer.projectRoots` VS Code workspace configuration -setting can be used to control which Polar files in a particular workspace -folder are treated as part of the same Oso policy. For more details, see [the -docs](reference/tooling/ide#configuring-which-polar-files-are-treated-as-part-of-the-same-policy). diff --git a/docs/examples/Makefile b/docs/examples/Makefile index 5fe80f90b8..1d67504c13 100644 --- a/docs/examples/Makefile +++ b/docs/examples/Makefile @@ -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.25.1.jar +JAVA_PACKAGE_JAR_PATH := $(JAVA_DIR)/oso/target/oso-0.26.0.jar # Note: if you are using bundler in a sub-makefile (in a docs test for example), # you need to add `unexport BUNDLE_GEMFILE` to that makefile. Otherwise this diff --git a/docs/spelling/allowed_words.txt b/docs/spelling/allowed_words.txt index a1b20b2004..fe9ccfd421 100644 --- a/docs/spelling/allowed_words.txt +++ b/docs/spelling/allowed_words.txt @@ -243,4 +243,5 @@ unsafety unspecialized untaken vec +vendoring webpack diff --git a/languages/java/oso/pom.xml b/languages/java/oso/pom.xml index ae76cf82fb..abb2b99edd 100644 --- a/languages/java/oso/pom.xml +++ b/languages/java/oso/pom.xml @@ -12,7 +12,7 @@ com.osohq oso - 0.25.1 + 0.26.0 diff --git a/languages/js/package.json b/languages/js/package.json index 8b7302c31d..f34f35d616 100644 --- a/languages/js/package.json +++ b/languages/js/package.json @@ -1,6 +1,6 @@ { "name": "oso", - "version": "0.25.1", + "version": "0.26.0", "description": "oso authorization library.", "bin": "bin/repl.js", "main": "dist/src/index.js", diff --git a/languages/python/django-oso/django_oso/__init__.py b/languages/python/django-oso/django_oso/__init__.py index 9d45dde97d..15437ef0c9 100644 --- a/languages/python/django-oso/django_oso/__init__.py +++ b/languages/python/django-oso/django_oso/__init__.py @@ -2,6 +2,6 @@ from .oso import Oso -__version__ = "0.25.1" +__version__ = "0.26.0" default_app_config = "django_oso.apps.DjangoOsoConfig" diff --git a/languages/python/django-oso/requirements.txt b/languages/python/django-oso/requirements.txt index 77838fd239..a770d5f994 100644 --- a/languages/python/django-oso/requirements.txt +++ b/languages/python/django-oso/requirements.txt @@ -1,2 +1,2 @@ -oso~=0.25.0 +oso~=0.26.0 django>=2.2 diff --git a/languages/python/docs/conf.py b/languages/python/docs/conf.py index 82a4b610ea..3565a83bcb 100644 --- a/languages/python/docs/conf.py +++ b/languages/python/docs/conf.py @@ -42,8 +42,8 @@ project = "oso" copyright = "2020-2021 Oso Security, Inc" author = "oso" -version = "0.25.1" -release = "0.25.1" +version = "0.26.0" +release = "0.26.0" # -- General configuration --------------------------------------------------- diff --git a/languages/python/flask-oso/flask_oso/__init__.py b/languages/python/flask-oso/flask_oso/__init__.py index 4e7c17e5cc..02e68d752d 100644 --- a/languages/python/flask-oso/flask_oso/__init__.py +++ b/languages/python/flask-oso/flask_oso/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.25.1" +__version__ = "0.26.0" from .flask_oso import FlaskOso from .decorators import authorize, skip_authorization diff --git a/languages/python/flask-oso/requirements.txt b/languages/python/flask-oso/requirements.txt index e0f8885a13..c460616d26 100644 --- a/languages/python/flask-oso/requirements.txt +++ b/languages/python/flask-oso/requirements.txt @@ -1,2 +1,2 @@ -oso~=0.25.0 +oso~=0.26.0 flask>=0.12.0 diff --git a/languages/python/oso/oso/oso.py b/languages/python/oso/oso/oso.py index 9aca028125..6b3e293aff 100644 --- a/languages/python/oso/oso/oso.py +++ b/languages/python/oso/oso/oso.py @@ -1,6 +1,6 @@ """Core oso functionality""" -__version__ = "0.25.1" +__version__ = "0.26.0" import os from typing import List, Any, Set diff --git a/languages/python/sqlalchemy-oso/requirements.txt b/languages/python/sqlalchemy-oso/requirements.txt index c17931ffd3..7febbf93cc 100644 --- a/languages/python/sqlalchemy-oso/requirements.txt +++ b/languages/python/sqlalchemy-oso/requirements.txt @@ -1,3 +1,3 @@ -oso~=0.25.0 +oso~=0.26.0 SQLAlchemy>=1.3.17,<1.5 packaging~=20.9 diff --git a/languages/python/sqlalchemy-oso/sqlalchemy_oso/__init__.py b/languages/python/sqlalchemy-oso/sqlalchemy_oso/__init__.py index 193eabaf1a..f33ff4bfae 100644 --- a/languages/python/sqlalchemy-oso/sqlalchemy_oso/__init__.py +++ b/languages/python/sqlalchemy-oso/sqlalchemy_oso/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.25.1" +__version__ = "0.26.0" from .auth import register_models diff --git a/languages/ruby/Gemfile.lock b/languages/ruby/Gemfile.lock index 3fbaac5184..e395f01c8b 100644 --- a/languages/ruby/Gemfile.lock +++ b/languages/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - oso-oso (0.25.1) + oso-oso (0.26.0) ffi (~> 1.0) GEM diff --git a/languages/ruby/lib/oso/version.rb b/languages/ruby/lib/oso/version.rb index b00d158206..7a08b94775 100644 --- a/languages/ruby/lib/oso/version.rb +++ b/languages/ruby/lib/oso/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Oso - VERSION = '0.25.1' + VERSION = '0.26.0' end diff --git a/languages/rust/oso-derive/Cargo.toml b/languages/rust/oso-derive/Cargo.toml index c583f12aa3..375719d89e 100644 --- a/languages/rust/oso-derive/Cargo.toml +++ b/languages/rust/oso-derive/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" homepage = "https://github.com/osohq/oso" readme = "README.md" -version = "0.25.1" +version = "0.26.0" edition = "2021" diff --git a/languages/rust/oso/Cargo.toml b/languages/rust/oso/Cargo.toml index 277ba808d1..55a04d1d40 100644 --- a/languages/rust/oso/Cargo.toml +++ b/languages/rust/oso/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "oso" readme = "README.md" -version = "0.25.1" +version = "0.26.0" edition = "2021" @@ -30,8 +30,8 @@ required-features = ["anyhow"] [dependencies] impl-trait-for-tuples = "0.2.1" maplit = "1.0.2" -oso-derive = { path = "../oso-derive", version = "=0.25.1", optional = true } -polar-core = { path = "../../../polar-core", version = "=0.25.1" } +oso-derive = { path = "../oso-derive", version = "=0.26.0", optional = true } +polar-core = { path = "../../../polar-core", version = "=0.26.0" } thiserror = "1.0.30" tracing = { version = "0.1.29", features = ["log"] } tracing-subscriber = { version = "0.3.1", default-features = false, features = [ @@ -50,7 +50,7 @@ uuid-07 = { package = "uuid", version = ">=0.7.0, <0.9.0", optional = true } [dev-dependencies] anyhow = "1.0.44" criterion = "0.3.5" -oso-derive = { path = "../oso-derive", version = "=0.25.1" } +oso-derive = { path = "../oso-derive", version = "=0.26.0" } static_assertions = "1.1.0" tempfile = "3.2.0" diff --git a/polar-c-api/Cargo.toml b/polar-c-api/Cargo.toml index 14b6e7d37c..f57ed6ef13 100644 --- a/polar-c-api/Cargo.toml +++ b/polar-c-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polar-c-api" -version = "0.25.1" +version = "0.26.0" authors = ["Oso Security, Inc. "] edition = "2021" @@ -10,7 +10,7 @@ crate-type = ["lib", "staticlib", "cdylib"] bench = false [dependencies] -polar-core = { path = "../polar-core", version = "=0.25.1" } +polar-core = { path = "../polar-core", version = "=0.26.0" } serde = "1.0" serde_json = "1.0.61" diff --git a/polar-core/Cargo.toml b/polar-core/Cargo.toml index e8d9741e48..128ebee889 100644 --- a/polar-core/Cargo.toml +++ b/polar-core/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" homepage = "https://github.com/osohq/oso" readme = "README.md" -version = "0.25.1" +version = "0.26.0" edition = "2021" diff --git a/polar-language-server/Cargo.toml b/polar-language-server/Cargo.toml index 357375f266..fbebc53953 100644 --- a/polar-language-server/Cargo.toml +++ b/polar-language-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polar-language-server" -version = "0.25.1" +version = "0.26.0" authors = ["Oso Security, Inc. "] edition = "2021" @@ -12,7 +12,7 @@ bench = false console_error_panic_hook = "0.1.6" js-sys = "0.3.53" lsp-types = "0.90.0" -polar-core = { path = "../polar-core", version = "=0.25.1" } +polar-core = { path = "../polar-core", version = "=0.26.0" } serde = { version = "1.0", features = ["derive"] } serde-wasm-bindgen = "0.3.1" wasm-bindgen = "0.2.76" diff --git a/polar-wasm-api/Cargo.toml b/polar-wasm-api/Cargo.toml index 382713ac30..ac5f6c1399 100644 --- a/polar-wasm-api/Cargo.toml +++ b/polar-wasm-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polar-wasm-api" -version = "0.25.1" +version = "0.26.0" authors = ["Oso Security, Inc. "] edition = "2021" @@ -11,7 +11,7 @@ bench = false [dependencies] console_error_panic_hook = "0.1.6" js-sys = "0.3.53" -polar-core = { path = "../polar-core", version = "=0.25.1" } +polar-core = { path = "../polar-core", version = "=0.26.0" } serde = { version = "1.0.119", features = ["rc"] } serde-wasm-bindgen = "0.3.1" wasm-bindgen = "0.2.76" diff --git a/vscode/oso/package.json b/vscode/oso/package.json index c3e613ec50..4885776835 100644 --- a/vscode/oso/package.json +++ b/vscode/oso/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.25.1", + "version": "0.26.0", "name": "oso", "displayName": "Oso", "author": "Oso Security Inc.",