Credential references: remove the warn-only compatibility path for running Galaxy/OpcUaClient drivers (hard-fail) #834
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?
Follow-up to #815 (owner chose warn-only for the first release). Running Galaxy/OpcUaClient drivers whose stored config has an out-of-namespace credential reference still resolve it with the old semantics via
LegacyCredentialReferenceTracker(constructed only in GalaxyDriver.cs and OpcUaClientDriver.cs), emitting a rate-limited WARN and acredential-compat:<field>diagnostics entry. Save, deploy (CredentialReferenceOutOfScope), Test Connect and browse already hard-fail.Once the
CredentialReferencePreflightServicewarning //rawbanner has been clean on every deployment (prod included), delete the tracker and make resolve-time refusal unconditional. Migration table: docs/security.md (incl.env:MX_API_KEY, the old Galaxy form default, andfile:).Blocked: removal waits until the #815 preflight banner is clean on every deployment, prod included. Prod deploys are on hold (no remote exec on the wonder boxes), so this cannot be verified yet.
Owner decision 2026-11-11: wait for the prod preflight. Warn-only stays until the owner confirms the
/rawcredential banner is clean on DEV/QA/prod. Stays blocked.Owner decision 2026-11-13: drop the "prod included" condition (no production box exists; any future prod install gets the strict behaviour from its first deploy). Read-only ConfigDb check, 2026-11-13:
wonder-app-vd03/OtOpcUaConfig:DriverInstance= FOCAS ×1wonder-sql-vq03/OtOpcUaConfig:DriverInstance= Calculation ×1 (script-runner canary)No Galaxy or OpcUaClient driver on either tier, so
LegacyCredentialReferenceTrackeris never built and the compatibility path is unused. Unblocked; removal queued.Done in
f0c6cf96(master).What changed
LegacyCredentialReferenceTrackerdeleted, with its rate-limited WARN and thecredential-compat:<field>diagnostics entry. Also gone: the per-driverLegacy*resolve methods and everylegacyparameter (GalaxySecretRef,GalaxyAckCredentialResolver,OpcUaUserIdentityFactory,OpcUaUserCertificatePaths,OpcUaClientSecretResolution), andIDriverDiagnosticsonGalaxyDriver/OpcUaClientDriver, which only carried the tracker entries.CredentialReferencesscope check. A running Galaxy driver (init, everyReopenAsync, ack fallback) and a running OpcUaClient driver (session open) refuse withCredentialReferenceExceptionbefore any store, env or file read, and before any endpoint is dialled. The tracker also kept a pre-#836 absoluteUserCertificatePathworking; that is now refused as well.CredentialReferenceBannerModelwent with the tracker. The ConfigDb scan stays because it still tells an operator something no other surface does: a Deployed finding is a driver that is not connecting, and a Draft finding is a deploy the gate will refuse (for example after restoring an old ConfigDb or importing a pre-#815 config). It also covers #835 and #836/#850. It logs one Error per finding, and the/rawbanner is nowalert-danger.docs/security.md: the migration text now says running drivers refuse, and the warn-only section is replaced by "The compatibility window is over"..claude/rules/drivers.mdand the vd03 preflight SQL comment are updated too.Tests
GalaxyDriverCredentialScopeTests(6), replacingGalaxyDriverLegacyCredentialTests:env:MX_API_KEY-style on init + reconnect,file:(file exists), out-of-namespacesecret:andSECRET:(0 store reads), ack fallback refused (0 gateway calls), and a positive control.OpcUaClientDriverCredentialScopeTests(5), all viaInitializeAsync:secret:otopcua/…,SECRET:opcuaclient/…andenv:NOT_A_REFrefused with 0 store reads and 0 endpoint opens; an absolute cert path refused; and a positive control.OpcUaClientSecretResolutionTestsandOpcUaClientUserCertificatePathTests. The AdminUI preflight tests drop the Running and banner-model cases and assert the Error level.ZB.MOM.WW.OtOpcUa.slnx(--no-incremental): 0 warnings, 0 errors.No deploy. DEV and QA ConfigDbs have no Galaxy/OpcUaClient driver (see the comment above), so nothing deployed is affected.
Deployed to DEV vd03 + QA vq03/vq04 in
c9640f5con 2026-11-13. Boot log on all three nodes:Credential-reference preflight (lmxopcua#815/#834): every stored and deployed reference is namespaced.with no Error line from the preflight (neither tier has a Galaxy/OpcUaClient driver; the pack's ConfigDb preflight found 0 references).Record:
docs/deploy/2026-11-13-vd03-qa-to-c9640f5c.md(c0ba450d).