gRPC data v1: projected node idle past its metadata lease returns BadUserAccessDenied for plain Read #922

Closed
opened 2026-11-24 02:36:17 -05:00 by dohertj2 · 1 comment
Owner

Found 2026-11-24 during the H3 live gate (docs/plans/evidence/grpc-data-ext/H3.md), reproduced in the Runtime harness by the H3 implementer. Pre-existing v1 behaviour (gRPC data connections, merged 95c5e484), not introduced by H3.

A projected (mapped) variable that has not been touched for longer than its MetadataLeaseMilliseconds (15 s on the rig) answers BadUserAccessDenied to a plain OPC UA value Read (and HistoryRead) instead of renewing its metadata lease or answering a retryable status. On the live rig, re-browsing did not always renew it when the browse page was still cached, which made an H06 run fail on SqlServer.

Why it matters: an OPC UA client polling a mapped node slower than the lease (or reading after an idle gap) gets an authorization failure — clients and ScadaBridge treat BadUserAccessDenied as a permanent permission error, not a transient one. Every mapped Read path is affected.

Expected: an expired lease is renewed on demand (within the read's deadline) or the read answers a retryable status (BadWaitingForInitialData / BadResourceUnavailable), never an access-denied; a re-browse renews the lease even when the browse page is cached.

Workaround in the H3 live gate: each held leg starts straight after a deploy and re-browse (scripts/validation/grpc-data/history_gate.py).

Fix before any v1 deploy (same class as #916/#917). Repro: Runtime harness — project a variable, wait > lease, Read ⇒ BadUserAccessDenied.

Found 2026-11-24 during the H3 live gate (`docs/plans/evidence/grpc-data-ext/H3.md`), reproduced in the Runtime harness by the H3 implementer. **Pre-existing v1 behaviour (gRPC data connections, merged `95c5e484`), not introduced by H3.** A projected (mapped) variable that has not been touched for longer than its `MetadataLeaseMilliseconds` (15 s on the rig) answers **`BadUserAccessDenied`** to a plain OPC UA value Read (and HistoryRead) instead of renewing its metadata lease or answering a retryable status. On the live rig, re-browsing did not always renew it when the browse page was still cached, which made an H06 run fail on SqlServer. Why it matters: an OPC UA client polling a mapped node slower than the lease (or reading after an idle gap) gets an authorization failure — clients and ScadaBridge treat `BadUserAccessDenied` as a permanent permission error, not a transient one. Every mapped Read path is affected. Expected: an expired lease is renewed on demand (within the read's deadline) or the read answers a retryable status (`BadWaitingForInitialData` / `BadResourceUnavailable`), never an access-denied; a re-browse renews the lease even when the browse page is cached. Workaround in the H3 live gate: each held leg starts straight after a deploy and re-browse (`scripts/validation/grpc-data/history_gate.py`). Fix before any v1 deploy (same class as #916/#917). Repro: Runtime harness — project a variable, wait > lease, Read ⇒ BadUserAccessDenied.
dohertj2 added the type:bugtype:deploy-gatepriority:p1 labels 2026-11-24 02:36:17 -05:00
Author
Owner

Fixed on master 4ac83085: a lapsed projected metadata lease is told apart from denial and renews on demand (own capped renewal pool + queue, 3 s budget); Value Read ⇒ BadWaitingForInitialData then Good, HistoryRead renews in-request (bounded, takes a history batch slot, honours cancellation); real ACL denial stays BadUserAccessDenied. history_gate.py workaround removed; live H01–H06 pass (f922a-sqlserver). Evidence docs/plans/evidence/grpc-data-ext/fu922.md. Write/CreateMonitoredItems on a lapsed node still deny — filed separately.

Fixed on master 4ac83085: a lapsed projected metadata lease is told apart from denial and renews on demand (own capped renewal pool + queue, 3 s budget); Value Read ⇒ BadWaitingForInitialData then Good, HistoryRead renews in-request (bounded, takes a history batch slot, honours cancellation); real ACL denial stays BadUserAccessDenied. history_gate.py workaround removed; live H01–H06 pass (f922a-sqlserver). Evidence docs/plans/evidence/grpc-data-ext/fu922.md. Write/CreateMonitoredItems on a lapsed node still deny — filed separately.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#922