Start from a full-permission grant and carve down per tenant or per path. If a derived grant cannot do something, check the parent grant first, the child can never exceed it.

Context: On Storj, access restrictions are baked into the API key inside an access grant as caveats: operations, buckets, path prefixes, time windows. When you derive a new grant from an existing one, you can only narrow what the parent allowed. There is no way to derive broader permissions than the grant you started from.