#core #authorization #polar

polar-core

Polar core library for oso, an open source policy engine for authorization that’s embedded in your application

16 releases (7 breaking)

new 0.12.0 Apr 14, 2021
0.11.3 Mar 31, 2021
0.11.0 Feb 17, 2021
0.9.0 Dec 8, 2020
0.8.2 Nov 25, 2020
Download history 1/week @ 2020-12-25 7/week @ 2021-01-01 150/week @ 2021-01-08 503/week @ 2021-01-15 207/week @ 2021-01-22 281/week @ 2021-01-29 230/week @ 2021-02-05 158/week @ 2021-02-12 106/week @ 2021-02-19 207/week @ 2021-02-26 373/week @ 2021-03-05 308/week @ 2021-03-12 367/week @ 2021-03-19 317/week @ 2021-03-26 453/week @ 2021-04-02 353/week @ 2021-04-09

1,261 downloads per month
Used in oso

Apache-2.0

465KB
11K SLoC

Oso

Development GitHub release (latest SemVer) Go version Maven version NPM version PyPI version RubyGems version Crates.io version Slack

What is Oso?

Oso is a batteries-included library for building authorization in your application.

Oso gives you a mental model and an authorization system – a set of APIs built on top of a declarative policy language called Polar, plus a debugger and REPL – to define who can do what in your application. You can express common concepts from “users can see their own data” and role-based access control, to others like multi-tenancy, organizations and teams, hierarchies and relationships.

Oso lets you offload the thinking of how to design authorization and build features fast, while keeping the flexibility to extend and customize as you see fit.

Developers can typically write a working Oso policy in <5 minutes, add Oso to an app in <30 minutes, and use Oso to solve real authorization problems within a few hours. To get started, you add the library to your application, create a new Oso instance and load an Oso policy. You can mix and match any of Oso’s authorization APIs to implement features like roles with custom policies that you write to suit your application.

Oso is ideal for building permissions into user-facing applications, but you can check out Use Cases to learn about other applications for Oso.

Oso currently offers libraries for Java, Node.js, Python, Ruby, Rust and Go.

Getting started

To get up and running with Oso, check out the Getting Started guides in the Oso documentation.

If you have questions, need help getting started, or want to discuss anything about the product, your use case, or authorization more generally, join us on Slack.

Development

Core

Oso's Rust core is developed against Rust's latest stable release.

Language libraries

Oso's language libraries can be developed without touching the Rust core, but you will still need the Rust stable toolchain installed in order to build the core.

To build the WebAssembly core for the Node.js library, you will need to have wasm-pack installed and available on your system PATH.

Language requirements

To work on a language library, you will need to meet the following version requirements:

  • Java: 10+
    • Maven: 3.6+
  • Node.js: 10.14.2+
    • Yarn 1.22+
  • Python: 3.6+
  • Ruby: 2.4+
    • Bundler 2.1.4+
  • Rust: 1.46+
  • Go: 1.12+

Contributing

See: CONTRIBUTING.md.

License

See: LICENSE.

Share your story

We'd love to hear about your use case and experience with Oso. Share your story on Twitter or fill out this form for some Oso swag.

Dependencies

~2–3.5MB
~89K SLoC