When a Change Takes Effect
How soon a revoked credential, a changed role or a passing assignment window reaches Canopy's own routes, an API guarded by the SDK, and an application that reads its tokens itself.
Three places answer for access
A change to someone's access is written to Canopy at once. What differs is how soon each place that answers may this person do this? learns of it, and that depends on where the answer comes from:
How soon each change lands
Each row is a change; each column is one of the places above: Canopy for its own routes, With the SDK for an API the SDK guards, and Token only for an application that reads its tokens itself. Next request means the request after the change is answered with it. At expiry means a token already issued keeps working until it expires, shown at the Environment's default lifetime. Next token means the change appears in the claims of the next token issued, at the latest when the current one expires.
| Change | Canopy | With the SDK | Token only |
|---|---|---|---|
| An identity deactivated or removed from the Environment | Next request | Within 60 seconds | At expiry (15 minutes) |
| A session signed out or revoked | Refresh: at once. Token: at expiry (15 minutes) | At expiry (15 minutes) | At expiry (15 minutes) |
| A machine client disabled or deleted | No new token: at once | At expiry (5 minutes) | At expiry (5 minutes) |
| A machine client's secret rotated | Old secret: after 24 hours, or at once | At expiry (5 minutes) | At expiry (5 minutes) |
| A role, assignment, membership or node changed | Next request | Within 60 seconds, or at once with invalidate | Next token (15 minutes) |
| A deny created or deleted | Next request | Within 60 seconds, with an SDK that reads model version 2 | Next token (15 minutes) |
| An assignment window opening or closing | On time | On time | Next token (15 minutes) |
A deactivated or removed identity reaches the SDK when it next reads that identity's grants, which come back empty. The SDK holds no answer past an assignment's next window edge, so a window opens and closes on time there too. An API key is checked on every request, so a revoked, rotated or expired key is refused from the next one. The SDK's token verifier allows 60 seconds of clock leeway on a token's expiry by default, so add that to any token lifetime above.
Three kinds of change
Every row is one of three kinds, each with its own bound:
Making it faster
The bounds above are the most a change waits. To close them sooner:
A webhook delivery reaches one of your processes. invalidate clears that process's cache only, so across several instances the cache window stays the guarantee unless you pass the event to every instance yourself.
Next Step
Tell us how we can improve this guide.