How Much of "This Version May Go Here" Can a Relationship-Based Permission Model Express?

A correct service list and a correct environment list do not mean every combination is allowed. What a relationship-based authorization (ReBAC) engine can answer once the deploy target is a single permission object, and what must be judged separately at execution time: build hash, approval plan, and target readiness.

John Baek
John Baek
Founder, CollabOps
2 min read

An operator can see both the booking service and the settlement service. Both services' production environments appear in the list. The permitted deploy combinations are "booking → prod VM group 1" and "settlement → prod VM group 2." If the screen lets you pick the service and the environment independently, you can also build a third combination: "booking → prod VM group 2." Two lists can each be correct without every combination being allowed.

The unit of deploy permission is neither the service nor the environment. It is the combination of a service and a concrete target. Give that combination an ID and you can ask about the requester's and the executor's permissions against the same target.

What does turning the deploy target into one permission object solve?

Once the combination itself is an object, the "unpermitted third combination" never becomes a choice in the first place. Assign a target ID to each combination of project, service, customer installation, environment, and concrete VM group or namespace. Then ask a relationship-based authorization (ReBAC) engine two questions: "may this requester request a deploy to this target?" and "may this executor run against the same target?" Engines in the Google Zanzibar family evaluate whether the relationship defined in the model holds between a user and an object, and implementations that support conditional relationships can express expiry of temporary permissions using passed-in context such as a trusted timestamp.

The relationship may allow it; whether build 218 runs now is a separate judgment

Let q be the requester, x the actual executor, and b the registered deploy target. s is the service, h the hash of the deploy file's contents, and k the identifier of the approval plan that binds target, file, config version, and execution method. At execution time t, the decision can be written simply as:

Allow(t) =   CanRequest(q, b, t)  AND  CanExecute(x, b, t)
         AND VerifiedBuild(s, h, t)
         AND ApprovalOK(k, t)     AND  Ready(b, t)

The first line checks the requester's and executor's permissions against the same target. The second checks that a trusted build verified that exact file for that service. The third covers whatever the current policy requires: approval, change windows, executor readiness, and so on. The authorization engine can answer the first line with relationship queries, but the second and third can only be answered by reading build records, the approval plan, and target state at execution time. In a dev environment that needs no separate approval, the approval condition can be treated as satisfied. If policy allows only one run per target at a time, a single execution slot must also be claimed when the job actually starts.

Say booking build 218 was approved for prod group 1. While it waits, the release tag moves to build 219. The relationship checks for requester and executor may both still pass. But 219's file hash differs from the approved plan. Either run the pinned file for 218, or get a new review for 219. And the block reason the operator needs here is not "insufficient user permission" but "approved file differs from current candidate." (Service names and build numbers are illustrative.)

Why the two rejections must leave different reasons

When evaluating a product, test the two rejections separately. One is a request that sends the right file to an unregistered target; the other sends an unapproved file to a permitted target. Both must stop, but with different recorded reasons, so you know which administrator to ask for what. When an approval's validity changes over time, see if an approver loses their role right before the deploy; for why we moved permissions onto a graph, see the permission model redesign.

  • #permissions
  • #deployment
  • #authorization
  • #architecture
  • #supply-chain