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:- How Oso Cloud evaluates authorization requests
- How Oso Cloud represents authorization logic using Polar
- How Oso Cloud represents authorization data using facts
- Sending authorization data to Oso Cloud at request time using context facts
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.
- Extract a fragment of authorization logic to a dedicated location
- Implement that logic in Polar
- Use an Oso Cloud SDK to evaluate the Polar logic alongside your authorization code
- Send authorization data to Oso Cloud as context facts
- Replace the context facts with data from your application database
- Replace your existing authorization code with a call to Oso Cloud