Authorization gets messy when scope strings are invented ad hoc. This tool generates permission scopes in consistent OAuth and RBAC formats, pairing a resource with an action and an optional ownership qualifier, so your access-control policy stays predictable and easy to audit.
How it works
A scope joins a resource (users, orders, invoices, reports) with an action (read, write, create, update, delete, list, manage) using a colon. You choose the word order: action:resource (the classic OAuth read:users) or resource:action (users:read, which groups by resource when sorted). A third format adds an ownership qualifier, producing resource:action:scope such as orders:read:own, where the qualifier (own, team, all) encodes row-level access. Each batch is de-duplicated.
Tips and example
Sample output in resource:action:scope format:
orders:read:own
invoices:write:team
users:manage:all
reports:list:team
- Begin with coarse
readandwritescopes and split into finer verbs only where a real grant boundary exists. Fewer scopes are easier to reason about and audit. - Use the ownership qualifier to push row-level rules into the scope itself.
orders:read:ownis clearer than scattering ownership checks through application code. - Keep one canonical scope per permission. If both
read:usersandusers:readexist for the same grant, your policy is ambiguous and bugs will follow.