← Problem Library
Security L7 SECURITY-1311 · 16 min

A Cloudflare Access policy looks correct and one API still returns 403 because the service worker cached an old JWT audience after the application moved to a new Access app

Login succeeds, yet the backend rejects requests because the browser keeps presenting a token minted for the previous Access audience.

SecurityPlatform ReliabilityLevel 7Pro16 min
Scenario

An internal API is moved behind a new Access application and only some users keep seeing 403 responses from a browser session that otherwise looks authenticated.

What to check first
  • Identify the primary failure signal in the The Edge Session Was Valid for the Wrong Access Audience scenario.
  • Separate visible symptoms from the underlying technical dependency.
  • Describe the safest recovery path and the follow-up prevention work.
Checking checklist
  1. Summarize the current impact and the last known change.
  2. Collect direct evidence from logs, runtime state, and configuration before changing anything.
  3. Separate immediate recovery from permanent prevention work.
Recovery and prevention

Compare the JWT audience and cached session artifacts before rewriting the policy itself.

Questions worth viewing together
What should you verify first when A Cloudflare Access policy looks correct and one API still returns 403 appears?

Community-field security problem inspired by Cloudflare Access community patterns where cached JWT audience drift caused 403 errors after an app move. A valid token can still be the wrong token for the app now enforcing it.

What usually causes A Cloudflare Access policy looks correct and one API still returns 403 in production?

Teams often blame policy order when the client is replaying a stale Access audience.

What should you document after resolving A Cloudflare Access policy looks correct and one API still returns 403?

Access app migrations should account for cached client tokens and worker-side session state.