E2E — reverse-write stage returns 0x801F0000 for anonymous session on Modbus HR[200] #219
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?
Surfaced by the #209 exit-gate smoke run (PR #218). 4 of 5 e2e stages PASS end-to-end against a live server +
seed-modbus-smoke.sql+ pymodbus fixture:The server log shows no exception on the write path — the status is coming from the OPC UA stack's guard chain, not from
ModbusDriver.WriteAsync.DriverNodeManager.OnWriteValue(src/.../Server/OpcUa/DriverNodeManager.cs:497) walks:_writable is nullcheck — shouldn't fire (ModbusDriverimplementsIWritable)WriteAuthzPolicy.IsAllowed(SecurityClassification.Operate, roles)— anonymous session has no roles, so this returnsBadUserAccessDenied(0x801F0000). Matches the wire status.Likely cause: the e2e script's
otopcua-cli writeconnects anonymously;WriteAuthzPolicydefaults denyOperatefor an empty role set.SecurityClassificationfor HR[200] isOperate(viaModbusDriver.DiscoverAsyncline 122 —t.Writable ? Operate : ViewOnly).Fix options (pick one)
LdapGroupRoleMappingor equivalent that maps unauthenticated sessions →WriteOperatein the smoke cluster only. Cleanest + matches Phase 6.2 conventions.otopcua-cli write -u <url> -U <user> -P <pass>exists — seed a test user withWriteOperateand pass them. Downside: credentials in the e2e sidecar.WriteAuthzPolicyshould acceptOperatefor anonymous sessions in a dev-mode flag. Biggest scope; probably wrong long-term.Reproduce
seed-modbus-smoke.sqldocker compose -f tests/.../Modbus.IntegrationTests/Docker/docker-compose.yml --profile standard up -dNode__NodeId=modbus-smoke-node Node__ClusterId=modbus-smoke+ sa creds./scripts/e2e/test-modbus.ps1 -BridgeNodeId "ns=2;s=HR200"Write failed: 0x801F0000Fixed in PR #221. Modbus e2e now 5/5 PASS with
OpcUaServer:AnonymousRoles=["WriteOperate"].