Core building blocks
Actor
The “who” in authorization. This is typically users or services making requests.Resource
The “what” being protected, usually application resources like documents, projects, or organizations.Roles
Roles are named sets of permissions that can be assigned to actors on resources.Permissions
Permissions are specified actions that can be performed on resources. Permissions are assigned to roles.Relations
Relations represent connections between resources, like “document belongs to project” or “project belongs to organization.”Writing rules
Rules define authorization logic using this syntax:- Organization viewers can read organizations
- Organization members can update organizations
- Organization admins can delete organizations
- Organization members inherit all viewer permissions
- Organization admins inherit all member permissions
- Users have a role on documents if they have the same named role on the document’s organization
- Document creators can delete a given document
- Organization members can edit documents if the document belongs to their organization
Next steps
With your policies defined, your application needs two things to enforce them:- Add facts: Send user roles and resource relationships to Oso Cloud. These facts power the policy logic.
- Make an authorization request: Call the Oso Cloud API to check if a user is allowed to perform an action based on those facts.