Agent Wranglers

ACC-38Required

Apply removed roles within the revocation limit

Apply a removed role or permission within the limit in end sessions when access changes. Never keep roles only inside a long-lived token or cache.

How to do it

Load the membership on each request, or cache it for no longer than that limit and clear the cache on every change. If access tokens carry roles, compare a membership version on each request, because a token may live longer under verify every token. Removing someone from an organisation follows remove access when someone leaves. It works when you check a named permission on the server for every action.

How to check

Demote a signed-in test admin to viewer. Within 60 seconds, their next admin request answers 403.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/accounts/roles-and-permissions/role-changes-immediate">Agent Wranglers accounts and identity playbook</a>. In code you write, add a comment next to it with the same link.