liveBook · Manning

Chapter 11: Authorization for APIs

What you will learn in chapter 11 of Authorization in Action

The introduction distinguishes internal API enforcement from external delegation and explains why ACME adopted complementary strategies for each.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction distinguishes internal API enforcement from external delegation and explains why ACME adopted complementary strategies for each.

Key terms: internal enforcement, runtime policy evaluation, Cedar, centralized, fine-grained decision point, external delegation, OAuth, specific capabilities, third-party applications

11.1 Authorization in a microservices world

This section explains why microservices made ACME’s API authorization fragmented and frames enforcement-point placement as the architectural decision, with Cedar remaining the decision maker.

Key terms: microservices, API surface, authorization, service boundary, policy enforcement point, Cedar, normalized authorization request, PDP

11.1.1 Pattern 1: API gateway as enforcement point

The section explains how ACME uses an API gateway to enforce Cedar policies on API requests, why decisions must reflect the person behind a service call, and where gateway coverage ends.

Key terms: API gateway, policy enforcement point, PARC, Cedar, confused deputy, principal, calling_service, north–south traffic, east–west traffic, central policy enforcement point

11.1.2 Pattern 2: Service mesh with sidecar enforcement

This section explains how service-mesh sidecars enforce Cedar authorization on internal API calls, using workload identity and request context to stop unauthorized traffic before it reaches downstream services.

Key terms: east–west traffic, service mesh, sidecar proxy, PEP, PDP, PARC, Docs service, Search service, Legal, doc:index

11.1.3 Pattern 3: Per-service proxies

This section explains how a proxy in front of an individual API enforces authorization when gateway or service-mesh enforcement is unavailable, using Finance as an example and weighing the operational tradeoff.

Key terms: per-service proxy, policy enforcement point, PARC request, Cedar, Finance API, cost-center data, service mesh, PEP, operational overhead, blast radius

11.1.4 Comparing enforcement patterns

The section compares where ACME enforces authorization across its APIs and identifies the common decision process shared by all three patterns.

Key terms: API gateway, service mesh, east–west calls, per-service proxies, policy enforcement point, normalized, evaluated, enforced, logged, consistent authorization decision

11.1.5 Other API authorization enforcement patterns

The section compares four additional API authorization enforcement patterns and explains why mixed architectures must maintain coverage and consistent policy decisions.

Key terms: in-process enforcement, Cedar library, local Cedar agent, mTLS, workload identity, network controls, coarse-grained controls, fine-grained authorization, event or broker enforcement, message broker

11.2 Authorization for external access to APIs

This section explains why sharing passwords for third-party API access is unsafe and how OAuth provides limited, revocable delegated access instead.

Key terms: password anti-pattern, authentication factors, OAuth, delegated access, scopes

11.2.1 The OAuth protocol and roles

The section uses Kate’s connection to an external reporting tool to explain OAuth’s four roles, how consent produces an access token, and why a valid token does not replace fine-grained policy checks.

Key terms: resource owner, client, authorization server, resource server, consent, access token, grant, OAuth scopes, collab:doc.read, Cedar

11.2.2 OAuth scopes

This section explains how OAuth scopes limit delegated API access and why ACME still evaluates each protected request with Cedar.

Key terms: scopes, client, resource owner, API capabilities, access token, JWT, token introspection, API gateway, delegation, OAuth token

11.2.3 Acquiring OAuth tokens

This section explains how interactive applications and unattended integrations obtain OAuth access tokens, and why ACME avoids two older grant types.

Key terms: Authorization Code Grant, consent, scopes, authorization code, access token, refresh token, installation record, tenant, narrow scopes, policy

11.2.4 Using OAuth tokens

This section shows how an API request carrying an OAuth token becomes a Cedar authorization decision, using delegated user access and a background integration as examples.

Key terms: access token, API gateway, PARC request, Cedar, principal, action, Authorization Code Grant, scopes, workspace membership, BI Explorer

11.3 From microservices to third parties: One policy story

This section brings ACME’s internal microservice and external third-party API authorization approaches together under one policy model.

Key terms: PARC request, Cedar policies, API gateway, service mesh, per-service proxies, OAuth tokens, scopes, outer boundary, Cedar, externalizing decision-making

11.4 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 10: Policy as code: Effective authorization policies Chapter 12: Authorization context →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.