Lion Cipher Lab

Issue audience-restricted access tokens with OAuth 2.0 Resource Indicators (RFC 8707)

Why it matters

The moment one login server (an authorization server) starts protecting more than one API, a quiet assumption becomes dangerous: that a token is a token. A plain access token is a BEARER token -- whoever holds it can use it -- and if it carries no record of WHICH API it was meant for, then a token your browser obtained to call your company's billing API can be replayed, unchanged, against the admin API, the internal reporting API, or a partner's API behind the same login server. Attackers who phish, log, or SSRF a single token get the run of everything that server guards. This is the OAuth…

What you'll learn

Steps in this lab

  1. The idea in plain language: tokens, claims, audience, and the confused deputy
  2. How this differs from the neighbouring token labs
  3. Set up a scratch folder and a tiny local token signer
  4. BEFORE: an authorization server that ignores which API the token is for
  5. AFTER: name the resource (RFC 8707) and bind it into `aud`
  6. Measure it: the replay is now rejected, and count the rejections
  7. The honest negatives: what audience restriction does NOT fix
  8. When to reach for this, and how a pro wires it up
  9. Clean up

Open the full interactive lab →