liveBook · Manning

Service-oriented authorization

As explained in Software Security for Developers

Service-oriented authorization is an authorization approach in which independently deployed services make authorization decisions for requests they receive.

Service-oriented authorization requires each independently deployed service to decide whether a request is allowed. A successful upstream check is not enough: network requests may arrive from an untrusted frontend or service, so every service must validate authorization for the resources it owns. section 17.2.2

Common approaches distribute authorization in different ways:

  • RBAC checks roles embedded in identity tokens, but role meanings can drift between services. section 17.2.2
  • ABAC evaluates claims such as department, region, or clearance level, provided services agree on their meanings and sources. section 17.2.2
  • ReBAC queries a central relationship store, such as OpenFGA or a custom authorization engine, to evaluate user-resource relationships. section 17.2.2
Figure 17.5 Enriching authorization claims across system layers. The IdP issues a token with basic claims, such as roles or user ID. The API Gateway can enhance the token with request-specific claims, such as active project IDs or request origin. Finally, backend services (such as the order service) might fetch additional business-specific data, such as user preferences, access scope, and customer assignments, from a profile service or a custom authorization component. This layered enrichment ensures that services receive the right context to make fine-grained authorization decisions.
figure

Claims can be enriched progressively: identity providers issue basic identity or role claims, gateways add request context, and backend services obtain business-specific access data. section 17.2.2

Centralized relationship checks improve consistency but add dependency risk. If the relationship store becomes unavailable, otherwise healthy services may be unable to validate access; high availability or fallbacks are therefore essential. section 17.2.2

How Software Security for Developers covers it

How deep it goes
Compares RBAC, ABAC, and ReBAC, including token drift, claim agreement, relationship queries, and availability tradeoffs.
Examples
Uses JWT role claims, enriched project and team claims, inconsistent regional attributes, and OpenFGA relationship queries.
What it assumes
Assumes familiarity with services and requests while explaining authorization models and trust boundaries in practical terms.
What you can do after
Evaluate authorization designs and validate access independently at each service boundary.
How it connects
Connects RBAC, ABAC, ReBAC, JWT, identity tokens, API gateways, and central relationship stores.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.