#How does permission resolution work?
oakallow resolves every tool call from most specific to least specific, and the first match wins. There are three stages.
- The tool must exist in your catalog, be enabled for the org, and meet the tool's required tier. Fail any gate and the result is disabled — the walk never starts.
- resource + tool + method, then resource + tool, resource + method, resource, tool + method, tool, method, and finally a tag match.
- If the request names a tenant and tenant-scoped rules exist, the tenant set is walked first, then the org set. If there are no tenant rules, the org set is the only set.
- The tool's default permission, then its category default, then "allowed" if the tool itself is approved, and finally the fail-safe: requires_approval.
Nothing is cached — every call is re-evaluated. If nothing matches and the tool is not pre-approved, the fail-safe is always requires_approval. Resolution runs at the edge in a Cloudflare Worker with single-digit millisecond latency.