Native alarm ack: surface Galaxy ack-credential refusal as a synchronous OPC UA status #760

Open
opened 2026-11-06 16:19:32 -05:00 by dohertj2 · 0 comments
Owner

Follow-up to #749.

#749 makes the Galaxy driver refuse a native alarm acknowledge when neither the session's API key has a Galaxy ack identity nor the driver has an AlarmAck fallback account (DriverOperationRefusedException; nothing is sent to mxaccessgw, never an empty operator_user). The refusal is excluded from the resilience breaker and logged by DriverInstanceActor with the fix.

Gap: the native-ack path is fire-and-forget after the Part 9 Acknowledge method returns (OtOpcUaNodeManager.HandleNativeAlarmAck -> NativeAlarmAckRouter -> DriverHostActor -> DriverInstanceActor), so the OPC UA call still returns Good and the local condition shows Acknowledged while Galaxy was never acked. The same is true of any async gateway rejection (wrong password -> non-zero hresult).

Options:

  1. Synchronous pre-check in the node manager: a host-published, lock-free snapshot of (condition NodeId -> owning driver's ack-credential capability: has fallback?) plus the set of key ids with a Galaxy ack identity (from Secrets-store metadata), returning BadUserAccessDenied with a reason when neither applies. Racy against just-made changes, but covers the static misconfiguration case.
  2. Revert-on-failure: DriverInstanceActor reports a refused/failed ack back to DriverHostActor, which un-marks the projector and re-reports the condition Unacknowledged (mirrors write-outcome self-correction). Covers async gateway failures too, but the client still sees Good on the call.

Recommendation: 2 (covers every failure class), optionally plus 1 for a clear status on the common misconfiguration.

Follow-up to #749. #749 makes the Galaxy driver refuse a native alarm acknowledge when neither the session's API key has a Galaxy ack identity nor the driver has an `AlarmAck` fallback account (`DriverOperationRefusedException`; nothing is sent to mxaccessgw, never an empty operator_user). The refusal is excluded from the resilience breaker and logged by `DriverInstanceActor` with the fix. Gap: the native-ack path is fire-and-forget after the Part 9 `Acknowledge` method returns (`OtOpcUaNodeManager.HandleNativeAlarmAck` -> `NativeAlarmAckRouter` -> `DriverHostActor` -> `DriverInstanceActor`), so the OPC UA call still returns `Good` and the local condition shows Acknowledged while Galaxy was never acked. The same is true of any async gateway rejection (wrong password -> non-zero hresult). Options: 1. Synchronous pre-check in the node manager: a host-published, lock-free snapshot of (condition NodeId -> owning driver's ack-credential capability: has fallback?) plus the set of key ids with a Galaxy ack identity (from Secrets-store metadata), returning `BadUserAccessDenied` with a reason when neither applies. Racy against just-made changes, but covers the static misconfiguration case. 2. Revert-on-failure: `DriverInstanceActor` reports a refused/failed ack back to `DriverHostActor`, which un-marks the projector and re-reports the condition Unacknowledged (mirrors write-outcome self-correction). Covers async gateway failures too, but the client still sees `Good` on the call. Recommendation: 2 (covers every failure class), optionally plus 1 for a clear status on the common misconfiguration.
dohertj2 added the priority:p2 label 2026-11-06 16:19:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#760