liveBook · Manning

OAuth scope

As explained in Authorization in Action

An OAuth scope is a named bundle of API capabilities that limits the access delegated to a client and represented in an OAuth token.

When BI Explorer analyzes Kate’s collaboration data, it should receive only the API capabilities she approves—not her password or unrestricted account access. An OAuth scope is a named bundle of related API capabilities represented in an access token. section 11.2.1 section 11.2.2

The client requests scopes from the authorization server, and the resource owner approves them. The resulting token may encode scopes directly as a JSON Web Token (JWT) claim or expose them through token introspection; ACME’s gateway reads them after validation. section 11.2.2

Typical collaboration API scopes include:

  • collab:workspace.read — read workspaces and memberships. section 11.2.2
  • collab:doc.meta.read — read document titles, owners, labels, and update times without reading content. section 11.2.2
  • collab:doc.write — update document titles or statuses. section 11.2.2
  • collab:task.read, collab:task.write, and collab:event.subscribe — read or update tasks and register for event notifications. section 11.2.2

Scopes define the broad contour of delegation, but they do not complete authorization. They do not determine workspace membership, document sensitivity, tenant installation, or whether a write includes required attribution. OAuth carries the delegated grant; Cedar evaluates the resource-specific decision. section 11.2.2

Figure 11.4 OAuth roles in action. Kate is the resource owner, BI Explorer is the client, ACME’s Customer Authentication Service is the authorization server, and the Customer Collaboration API is the resource server.

Use the role diagram to trace the grant from resource owner through client and authorization server to the resource server. section 11.2.1

How Authorization in Action covers it

How deep it goes
Explains scope bundles, approval, token representation, and limits, then defers resource-specific authorization to Cedar.
Examples
Uses collaboration scopes for workspaces, document metadata, document writes, tasks, and event subscriptions.
What it assumes
Assumes basic API and identity concepts while defining OAuth roles, consent, tokens, and delegated access.
What you can do after
Evaluate/understand how to delegate limited API capabilities and combine OAuth grants with resource-specific policy checks.
How it connects
Connects OAuth scopes with access tokens, authorization servers, resource servers, API gateways, and Cedar authorization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Authorization in Action. The section links point to the parts of the book it draws on.