ACL: a NodeAcl row can scope at an entity in another cluster and pass the deploy gate #529
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in
3a6b2a1d(#520 stage 3). Never shipped — the deploy gate itself is new in that commit.The new
DraftValidator.ValidateNodeAclScopesrule initially checked only that aScopeIdresolved to areal entity. A row in cluster A naming an entity in cluster B resolves to a real trie path, so it passed —
a cross-cluster authorization leak rather than the "names nothing" failure the rule was about.
Fix. New error code
NodeAclScopeCrossCluster, distinct fromNodeAclScopeUnresolved, because the twoneed different remedies and the message names both clusters.
Ownership is non-uniform and worth recording:
RawFolder,DriverInstanceandUnsAreacarryClusterIddirectly;
Device,TagGroup,Tag,UnsLineandEquipmentinherit it through their parent chain.Neither self-nesting axis (
ParentTagGroupId,ParentRawFolderId) lies on the path to the cluster, so everychain is ≤ 3 hops and cannot loop — no depth guard needed, unlike
AclScopePathResolver's ancestry walks.The lookups are deliberately fleet-wide, not cluster-filtered: a cluster-filtered lookup would make a
cross-cluster id present as "unresolved" and the new rule would never fire. That trap is pinned by a
mutation test asserting the cross-cluster row is never also reported as unresolved.