DEV Community

Charlie Xu
Charlie Xu

Posted on

The Revocation Check: A Lab on Additive Access Grants

Closing a revocation ticket requires a defined target. An independent second check can show whether a particular subject still has a particular permission; deleting a binding tells us only which object was removed.

The setup

Consider a cohort that shares one credential for an eval runner. A student rotates out. That credential represents the runner, so removing its grant affects everyone using it. For the lab, use separately identifiable subjects so the control can be tested independently.

Kubernetes RBAC documentation states that grants combine additively. A RoleBinding grants its subjects permissions in the binding's namespace even when it references a ClusterRole, and a ClusterRoleBinding grants the referenced role's permissions cluster-wide. Removing one binding may leave equivalent access through another grant (RBAC docs).

Prerequisites: two or more subjects, two or more grants that could overlap, and an evidence store you own. Without a cluster, use a paper inventory.

Steps

  1. Inventory the relevant bindings and the grants for a named subject. Keep the identities of overlapping grants.
  2. Record a before decision for one verb, resource and namespace. Record a second subject that should keep the same access.
  3. Revoke one test grant, record which one was removed, and repeat both decisions using the same method.
  4. Record lineage for the test artifact, the change activity, and the responsible agent. W3C PROV-DM supplies that vocabulary; it does not certify the outcome.

Test

Inputs: before inventory, the removed grant, and after inventory using the same subject list and reading method. Observe whether the revoked subject still has the specific permission, whether every other subject's effective permissions match the first read, and whether the record names an agent.

In the first trial, give the target exactly one grant for the selected capability. Removing it should change that decision to denied while the control stays allowed. In a separate trial, give the target two matching grants and remove only one; the target should still be allowed. If an outcome differs, identify which grant and subject were active before deciding whether to change access again.

Boundary: one subject can still lose its sole RBAC grant. Test credential validity separately. With one subject there is no independent subject control; with one grant the overlapping-grant trial cannot be run.

This article was created with AI assistance.

Top comments (0)