fix(dataconn): #957 /raw refuses adding an alarm to an export-root tag; data-connection saves refuse only errors they introduce; ACL-hidden nodes inside a grant answer NotFound

1. RawTreeService.UpdateTagAsync refuses the edit that makes a tag alarm-bearing while it roots an enabled
   DataExport (RawTag, or UnsTagReference to it) with the #942 DataExportRootAlarmBearing text (shared constants).
   DataConnectionAdminService refuses only errors a save/delete introduces or that remain on the saved row, so a
   pre-existing invalid row no longer blocks unrelated rows (two invalid rows used to deadlock); deploy gate unchanged.
2. Origin: GetMetadata/Read/Subscribe/condition admission answer a node inside the grant that the origin ACL hides
   (no Browse and no Read) NotFound, like a missing one (Browse omits it; HistoryRead/Write already uniform). Denied
   stays for visible nodes. Consumer renewal treats NotFound like Denied (#939 Refused), so tightening the ACL on a
   projected node still reads BadUserAccessDenied.
This commit is contained in:
Joseph Doherty
2026-12-01 20:34:22 -05:00
parent e66f072121
commit 285015c9de
14 changed files with 348 additions and 38 deletions
+17 -1
View File
@@ -263,7 +263,14 @@ Neither change alters the wire shape: one drops an optional field, the other dro
alarm-bearing tag: that reference has no UNS node (#896), and a deployed export rooted at it would make the node's
catalog compile refuse the whole export set. Root the export at the tag's folder, device or tag group (Raw) or at the
referencing equipment (UNS) instead; the condition is listed there. A node re-validating an already-deployed artifact
does not apply this rule.
does not apply this rule. **/raw refuses the reverse edit too (#957):** saving a tag with a new alarm config when the tag
already roots an enabled export (directly, or through a `UnsTagReference` to it) is refused with the same text. A tag
that was already alarm-bearing can still be edited; the deploy gate reports the export.
- **A pre-existing invalid row does not block unrelated data-connection edits (#957).** Saving or deleting a
connection, export or mapping is refused only for an error the change *introduces*, or one still attached to the row
being saved. An error some other row already had does not refuse it. Before, the whole draft had to be valid: one
stale invalid export blocked every unrelated save, and with two invalid rows neither could be fixed or deleted first.
The deploy gate (`DraftValidator`) still validates the whole draft, so nothing invalid deploys.
- The alarm itself is forwarded as a **condition** (A1–A4, see "Condition forwarding end to end"). Condition placements
do not depend on the value node.
@@ -274,6 +281,15 @@ Neither change alters the wire shape: one drops an optional field, the other dro
browsable ancestor of the root) that the export's operations, the node's operations or the origin ACL refuse. Browse
(`Denied` for an unknown or ungranted parent), Write (one rejection), HistoryRead (one `Refused` status) and condition
methods (`BadNodeIdUnknown` for an unknown or ungranted placement) already answered both cases alike.
- **Inside the grant, an ACL-hidden node is NotFound too (#957).** A node inside one of the principal's exports that
the origin ACL hides from the peer is answered `NotFound` by GetMetadata, Read, Subscribe and condition-item
admission, including through a mismatched view of it. Hidden means the ACL grants the peer neither Browse nor Read on
the node, which is the rule that admits GetMetadata. Browse never lists such a node, and HistoryRead and Write already
answer it like a missing one. `Denied` remains only for a node the peer may see but whose operation is refused by the
export, the node or the ACL. On the consumer, an on-demand renewal answered `NotFound` is the same definitive refusal
as `Denied` (#939, `BadUserAccessDenied`, held), so tightening the origin ACL on an already-projected node still reads as
an access denial, not a lapse. The diagnostic consequence: an origin answering `NotFound` for a node that exists may be
its ACL, so check the ACL for the service principal too.
G0, the v1 deploy and soak (#915), is still open; see the plan's §1.1.