Acknowledge alarms as the authenticated operator (AckMsg write) #162
Reference in New Issue
Block a user
Delete Branch "feat/ackmsg-as-operator"
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?
Acknowledges an alarm as the operator who requested it, so the Historian events table records the real operator, the way InTouch does.
The worker authenticates the operator with
AuthenticateUser, then writes the ack comment to<TAGNAME>.AckMsgover MXAccess. It does this on its ownLMXProxyServer, registered underMxGateway:Alarms:AckClientName(defaultMxGateway); the Historian records that name asOperatorNode. The alarm-client ack paths (wnwrapAlarmAckByName/ByGUID, the managedaaAlarmManagedClient, WNAL) are inert when run headless (seedocs/AlarmProbeFindings.md, "Fourth attempt"), so this PR removes them.Changes
AcknowledgeAlarmRequest.operator_password = 6,operator_domain = 7. Worker ack commands also carry the password.GatewayProtocolVersionstays at 3.AlarmAckWriter: authenticate, AddItem+Advise, Write, then a bounded pumped wait forOnWriteComplete. It keeps an LRU item cache, rebuilds the item after an unconfirmed write, tears down and re-registers on RPC disconnect, and classifies interop failures by HRESULT.ACK_*XML fields are parsed and attributed on Acknowledge transitions.operator_useris required (InvalidArgument otherwise). Ack commands are now treated as credential-bearing for log redaction, and any property named likepasswordis redacted. NewAckClientNameoption, passed to the worker by env var.--operator-domain,--operator-password,--operator-password-env(defaultMXGATEWAY_OPERATOR_PASSWORD).Grpc.md(status mapping, upgrade note),DesignDecisions.md,GatewayConfiguration.md,Diagnostics.md,Authorization.md(the credential-oracle trade-off of keeping ack underinvoke:write),AlarmProbeFindings.md,CLAUDE.md.Status mapping
Upgrade impact
Callers must send
operator_userand the operator's Galaxy password. OtOpcUa'sGatewayGalaxyAlarmAcknowledger(Runtime/GatewayGalaxyAlarmAcknowledger.cs:50) sends no password. Update it before this gateway is deployed anywhere OtOpcUa acks alarms.Verification
test+checkGeneratedCleanall green.SUCCESS, 574 pass / 0 fail.e7f5662deployed, then rolled back):Administratorreturns OK / hresult 0..Acked=True,.AckMsg= the comment.ACK_ALMrow:Operator=Administrator, DomainName=ArchestrA, UserFullName=Administrator, OperatorNode=MxGateway, Description=<comment>.Deploy notes found on windev (not changed by this PR)
Secrets:SqlitePath, or one inside the content root. The old liveappsettings.jsonusedmxgateway-secrets.db, so the test deploy moved the store toC:\publish\mxaccessgw\secrets\.NU1903(GHSA-846f-f764-76mx) on transitiveSystem.Security.Cryptography.Pkcs9.0.4 now failsdotnet restoreon windev because ofTreatWarningsAsErrors. This also affectsmain.https://claude.ai/code/session_016J6isfcgqy4SB2RK3ZvFvT
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.