Skip to main content

Iterative Adoption of Oso Cloud

This guide presents an iterative approach to replace your existing authorization code with Oso Cloud. After reading the guide, you’ll know how to:
  • Extract authorization logic from your application code
  • Convert authorization logic to Polar
  • Make authorization decision with Oso Cloud SDKs
  • Simplify data management without synchronization
  • Minimize disruption by implementing in small steps

Intended Audience

This guide is for engineers looking to implement a proof-of-concept of Oso Cloud. To use Oso for the first time, you can review our quickstart guide.

Assumptions

This guide provides concise overviews of the core concepts of Local Authorization. In particular, the guide assumes that you understand: The guide links to more resource with each concepts. If this is your first time approaching any of them, you may want to explore the additional resources to learn more.

Outcomes

After converting authorization code to Oso Cloud, you can expect the following benefits:
  • Your authorization logic is explicit
  • Your authorization code is easier to test and modify
  • You spend less time on authorization and more time on differentiating features

The process

The samples throughout this walkthrough are written in TypeScript. Oso provides client libraries for many popular languages, so the techniques described here will likely apply to your application. The syntax may differ depending on your programming language.
You’ll follow these steps as you implement Oso Cloud:
  1. Extract a fragment of authorization logic to a dedicated location
  2. Implement that logic in Polar
  3. Use an Oso Cloud SDK to evaluate the Polar logic alongside your authorization code
  4. Send authorization data to Oso Cloud as context facts
  5. Replace the context facts with data from your application database
  6. Replace your existing authorization code with a call to Oso Cloud
First, you will extract a piece of authorization logic for refactoring.