FIGURE 3 · A NARROW TOKENILLUSTRATIVE

Ask for three permissions. Receive only what the task needs.

THE AGENT ASKS FOR

orders:read
orders:write
refunds:create
→

OFFERED BY THE
ORDERS SERVICE

orders:read ✓
orders:write ✓
refunds:create ✕
not this service’s permission
→

ALLOWED FOR THE
AGENT’S ROLE

orders:read ✓
orders:write ✕
not in support-agent’s role
→

ISSUED ACCESS TOKEN

for
support-agent
audience
orders service
scope
orders:read
lifetime
short

THE AUDIENCE STAMP · ONE SERVICE ONLY

token→refunds service✕

Rejected: wrong audience. A token stamped for the orders service can’t be reused somewhere else.

THE DATA BOUNDARY · CHECKED BY YOUR API

#1040Sam’s shopvisible
#1041another shopfiltered
#1042Sam’s shopvisible

orders:read is a kind of access, not every order. The API still decides which records.